<div class="gmail_quote">On Fri, Apr 10, 2009 at 5:03 PM, Alexander Neundorf <span dir="ltr"><<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Friday 10 April 2009, Adrian Boeing wrote:<br>
> Hi,<br>
><br>
> I would like to have a portable way of having separate include<br>
> directories for each 'project' in my visual studio 'solution'.<br>
> ie:<br>
> common/<br>
> dir/file1<br>
> dir/file2<br>
><br>
> share the include directory 'common' , and have seperate 'include1'<br>
> and 'include2' directories.<br>
> This would correspond to two 'projects' in my 'solution'<br>
> one with files1 and common,include1 directories<br>
> the other with files2 and common,include2 directories<br>
><br>
> It is my understanding that INCLUDE_DIRECTORIES is a global setting?<br>
<br>
</div>It's a per-directory setting, i.e. if a call to include_directories() applies<br>
to that directory and all sub directories of it, but not to sibling or parent<br>
directories.<br>
So you could do<br>
<br>
include_directories(common)<br>
in the toplevel CMakeLists.txt<br>
and additionally<br>
include_directories(include1)<br>
and<br>
include_directories(include2)<br>
in the dir/file1 and dir/file2 subdirectories.</blockquote><div><br>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.<br>
<br><a href="http://public.kitware.com/Bug/view.php?id=8874">http://public.kitware.com/Bug/view.php?id=8874</a><br></div></div><br>-- <br>Philip Lowman<br>