Hi, On Tue, Sep 06, 2011 at 04:50:30PM -0400, [email protected] wrote: > Date: Tue, 6 Sep 2011 16:50:28 -0400 > From: David Cole <[email protected]>
> CMake does not track dependencies of header-only "libraries". It only > tracks actual library dependencies given by target_link_libraries > commands. > > You will have to come up with your own way to manage your projects > interconnections. > > CMake provides the include_directories command so that you can say > where your header files are. If Z depends on A and B's header files > then Z is going to have to have include_directories commands for A and > B's include directories. > > Sorry there's no magic bullet here. Hmm, but surely the Config file mechanism (as used e.g. within a common build tree) may be a useful/more suitable way to do it rather than doing a manual open-coded include_directories()? Just to mention, AFAIR it's done like that: - libxxx/CMakeLists.txt defines (header location, build defines, ...) variables - that file then does a configure_file() on a libxxxConfig.cmake.in which thus encodes these settings - other projects within the build tree then include(libxxxConfig.cmake) (more or less specifically or implicitly pathed) (or alternatively include a Use file which _both_ includes Config file _and_ then activates these include paths for the local project) Or, more specifically, Z would somehow make sure to evaluate AConfig.cmake and BConfig.cmake. Andreas Mohr _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
