[CMake] How do you handle recursive dependencies in CMake

Tim Rae perceptualchaos2 at gmail.com
Tue Jun 19 09:38:55 EDT 2018


Hi all,

I spent a bit of time working on this issue the last few days, and since I
didn't see a satisfactory answer in this thread I thought I'd resurrect the
thread since it's one of the first google hits.
it seems that all you need to do to solve the problem of transitive
dependencies is make your package config files call find_package() /
find_dependency() for their dependencies. I've posted some example code on
a similar thread on stack overflow:

https://stackoverflow.com/a/50929353/2125915

This is what has worked for me, and I believe it solves the problems
discussed in this thread. I have only tested it at shallow levels of
recursion, but I think it works. Please let me know if there is any problem.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180619/c0fca4ae/attachment.html>


More information about the CMake mailing list