Is is possible to add include directories for a particular source file?

Right now I do:

INCLUDE_DIRECTORIES(${Extra_Include_Dir})

But this puts the extra includes on all the files for the libraries in the CMakeLists.txt file. What I want is to do something like:

  SET_SOURCE_FILES_PROPERTIES(MyFile.cc
PROPERTIES INCLUDE_DIRECTORIES ${Extra_Include_Dir})

This doesn't work, but perhaps I could add something to COMPILE_FLAGS, but how do I do this in a build system portable way?

James
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to