On Friday 10 April 2009, Adrian Boeing wrote: > Hi, > > I would like to have a portable way of having separate include > directories for each 'project' in my visual studio 'solution'. > ie: > common/ > dir/file1 > dir/file2 > > share the include directory 'common' , and have seperate 'include1' > and 'include2' directories. > This would correspond to two 'projects' in my 'solution' > one with files1 and common,include1 directories > the other with files2 and common,include2 directories > > It is my understanding that INCLUDE_DIRECTORIES is a global setting?
It's a per-directory setting, i.e. if a call to include_directories() applies to that directory and all sub directories of it, but not to sibling or parent directories. So you could do include_directories(common) in the toplevel CMakeLists.txt and additionally include_directories(include1) and include_directories(include2) in the dir/file1 and dir/file2 subdirectories. Alex _______________________________________________ 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