[CMake] third party library dependencies

Roman Shtylman shtylman at gmail.com
Thu Dec 17 12:18:53 EST 2009


Is there an easy way to setup link dependencies between libraries not
build using cmake?

Lets say I have a system library A which depends on system library B.
I then make an executable that uses code from A. I need to link
against A and B, but as a user of just library A, I don't want to
worry about that. Does cmake have a facility to define such a
hierarchy/dependency chain so that I can just do

target_link_libraries(<target> A)

and have it figure out that it needs to link against B as well?

Note that neither A nor B are built using cmake, they already exist.

~Roman


More information about the CMake mailing list