[CMake] subprojects

Tomasz Grobelny tomasz at grobelny.oswiecenia.net
Thu Oct 27 11:46:09 EDT 2011


I have several subprojects (eg. libA and libB) and I want to make a parent
project that would group both of them. The problem is that libB depends on
what is installed by libA. I have come up with two ideas:
 1. Configure libA and libB as ExternalProjects - the build process works
but when I open the parent project in Visual Studio I do not see the source
and header files.
 2. Use add_subdirectory command - this make the project look good in VS,
but doesn't build well as libB build is started before installing libA.

How do I solve this problem? Is it possible to either add source files in
(1) or add dependency on install of libA to libB in (2)? Or maybe some
other option?
-- 
Regards,
Tomasz Grobelny


More information about the CMake mailing list