Use case : incorporating building some boost libraries via External Project, so no find_package (since also cross build scenarios), Afterwards in the same CMakeLists.txt I can either turn them into:
- imported targets ==> doesn’t work since they are not build yet, and consumer CMakeLists.txt give warnings
- turn them into interface libraries => this works fine, except for one problem. I am doing something similar like FindBoost.cmake, that is i also try to model the interdependencies, eg boost::thread depends on boost::chronoe,date_time,atomic and for example boost::iostreams on zip (build with zip). Off course the only way to specify are INTERFACE specification, which means telling the user of the boost library in case to also link with the dependencies (my use case : all static libraries). So far so good, however the linker sometimes has issues, because the order itself is not correct, it is not taking into account that boost::thread depends on the other ones, and as such should come first to the linker command before its dependencies(similar for the iostreams versus zip).
How can this be done correctly ?