<div class="gmail_quote">On Fri, Apr 10, 2009 at 5:03 PM, Alexander Neundorf <span dir="ltr">&lt;<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>&gt;</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>
&gt; Hi,<br>
&gt;<br>
&gt; I would like to have a portable way of having separate include<br>
&gt; directories for each &#39;project&#39; in my visual studio &#39;solution&#39;.<br>
&gt; ie:<br>
&gt; common/<br>
&gt; dir/file1<br>
&gt; dir/file2<br>
&gt;<br>
&gt; share the include directory &#39;common&#39; , and have seperate &#39;include1&#39;<br>
&gt; and &#39;include2&#39; directories.<br>
&gt; This would correspond to two &#39;projects&#39; in my &#39;solution&#39;<br>
&gt; one with files1 and common,include1 directories<br>
&gt; the other with files2 and common,include2 directories<br>
&gt;<br>
&gt; It is my understanding that INCLUDE_DIRECTORIES is a global setting?<br>
<br>
</div>It&#39;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&#39;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>