[CMake] How do you handle recursive dependencies in CMake

Sven Baars s.baars at rug.nl
Thu Jun 30 09:19:09 EDT 2016


Hey Marcel,

They are indeed always set correctly, and for this reason, find_package
is also always able to find these packages, which is great, and this is
why I love using CMake, but then it still happens that when you don't
explicitly use find_package, so in this case I don't use find_package(A)
in package C because C only depends on B, it will give an error, as can
be seen in my example on Github:

https://github.com/Sbte/cmake-example

The error is:

Linking CXX shared library libC.so
/usr/bin/ld: cannot find -lA

It might be that I am just doing something wrong here, so in that case
please let me know.

Cheers,
Sven


More information about the CMake mailing list