Re: [CMake] Is there a way to delay "find_package" until link-time when the package is actually needed?

2019-02-14 Thread Timothy Wrona
I guess what I would ultimately like to achieve would be a "pre-cmake-configuration" step that just initializes the package registry with the location of each project's build tree and copies the "project-config.cmake" files into each projects build-tree. This would allow it to be found during gener

Re: [CMake] Is there a way to delay "find_package" until link-time when the package is actually needed?

2019-02-14 Thread Eric Noulard
Le jeu. 14 févr. 2019 à 18:57, Timothy Wrona a écrit : > The problem is it is very likely that there are some circular dependencies > in the build tree -- which is why it was broken up to generation of all, > then build all, then link all in the first place. > Yes, wrong solution to a real desig

Re: [CMake] Is there a way to delay "find_package" until link-time when the package is actually needed?

2019-02-14 Thread Timothy Wrona
The problem is it is very likely that there are some circular dependencies in the build tree -- which is why it was broken up to generation of all, then build all, then link all in the first place. With circular dependencies there's no real way to sort these dependencies out without just running g

Re: [CMake] Is there a way to delay "find_package" until link-time when the package is actually needed?

2019-02-14 Thread Eric Noulard
Le jeu. 14 févr. 2019 à 18:22, Timothy Wrona a écrit : > I have a collection of interdependent CMake projects (lots of legacy code) > that I want to convert to using CMake targets for linking. The code is > built in such a way that all projects run cmake generation, then all > projects build, the

[CMake] Is there a way to delay "find_package" until link-time when the package is actually needed?

2019-02-14 Thread Timothy Wrona
I have a collection of interdependent CMake projects (lots of legacy code) that I want to convert to using CMake targets for linking. The code is built in such a way that all projects run cmake generation, then all projects build, then all projects link. I would like to export a CMake target from