[CMake] adding include directories to main target

j j at dynamica.org
Wed Oct 26 14:46:26 EDT 2011


Hi there,

I'm trying to set the include directories that a library in my project 
uses
into my main target. the hierarchy is as follows:

CMakeLists.txt (A)
+application
  CMakeLists.txt (B)
+library
  CMakeLists.txt (C)

B is called by A through add_subdirectory and B does a LINK_LIBRARIES 
for 'library'.
A calls C as well through add_subdirectory and that adds a target for 
'library' to the project.
there are, however many compiler flags and include paths set in C that 
are needed in the
'main' target of the project to compile 'application'

How do I make the include paths set by C appear in the target for 
'application' ?

Thanks,

Jonathan


More information about the CMake mailing list