[cmake-developers] [partial duplicate of users mailing list] SelectLibraryConfigurations

Brad King brad.king at kitware.com
Thu Feb 4 13:00:16 EST 2016


On 02/03/2016 02:39 PM, Adam Rankin wrote:
> So, is it expected that each project in a client's package
> will call find_package(xyz)?
> I am used to the top level CMakeLists finding all the dependencies,
> and then passing the information down into projects.

After calling find_package(xyz) the imported targets will be
visible in the directory where the call is made and below for
use with target_link_libraries.  The top level is sufficient
but not always necessary.  Transitive dependencies will still
be followed across directories even if the final dependent
cannot see the imported target directly.

-Brad


More information about the cmake-developers mailing list