[CMake] Different INCLUDE_DIRECTORIES for each library

Alexander Neundorf a.neundorf-work at gmx.net
Fri Jul 6 08:34:23 EDT 2007


On Friday 06 July 2007 07:45, Paul Richards wrote:
> Hi,
> I have one large CMakeLists.txt file which defines multiple static
> libraries.  I'm currently using INCLUDE_DIRECTORIES which sets the
> include path for all of them at once.  Can I set different include
> directories for each static lib?

This is  currently not really possible, include directories are per directory.
There may be an improvement there in cmake 2.6 (which will still needs some 
months) or you could use SET_TARGET_PROPERTIES(COMPILE_FLAGS "-I dir"), but 
then cmake won't know about the include dirs and e.g. the dependency scanning 
might not work.

Alex


More information about the CMake mailing list