[CMake] INCLUDE_DIRECTORIES per project
Philip Lowman
philip at yhbt.com
Fri Apr 10 18:22:09 EDT 2009
On Fri, Apr 10, 2009 at 5:03 PM, Alexander Neundorf <a.neundorf-work at gmx.net
> wrote:
> 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.
I've filed a feature request to allow write-access to the
INCLUDE_DIRECTORIES directory property. This would allow people to remove
include paths if they had a need to.
http://public.kitware.com/Bug/view.php?id=8874
--
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090410/fbbbdf80/attachment.htm>
More information about the CMake
mailing list