<div dir="ltr">Hi Magnus, <div><div><br></div><div><div>As already mentioned, the target property INCLUDE_DIRECTORIES has been introduced in CMake 2.8.8. The following page is useful to find out such things. See <a href="http://www.cmake.org/Wiki/CMake_Version_Compatibility_Matrix/Properties#Properties_on_Targets" target="_blank">http://www.cmake.org/Wiki/CMake_Version_Compatibility_Matrix/Properties#Properties_on_Targets</a></div>




<div><br></div><div>To get around it, as mentioned by Bill, you could probably create on folder per target and call include_directories() in each folder.</div><div><br></div><div>An other option could be to create a wrapper around the &quot;add_target&quot; command that would create a directory, write a CMakeLists and then call add_subdirectory(/path/to/project-build/target target).</div>


<div><br></div><div>Hth</div><div>Jc</div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 28, 2013 at 3:32 AM, Magnus Therning <span dir="ltr">&lt;<a href="mailto:magnus@therning.org" target="_blank">magnus@therning.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The other day I was putting together some cmake files and made them<br>
work on my system, where I have version 2.8.10.2 installed.  After<br>
giving my work to a colleague he reported that it didn&#39;t work.  It<br>
came down to him using version 2.8.7 (comes with his Linux distro) and<br>
my use of<br>
<br>
~~~~<br>
set_property( TARGET app PROPERTY INCLUDE_DIRECTORIES<br>
    ....<br>
    )<br>
~~~~<br>
<br>
In the folder in question there is source for several different<br>
targets, so I&#39;d really like to use per-target include dirs (i.e.<br>
include_directories would not be a good match).  Is there a mechanism<br>
for (easily) getting per-target include dirs that work in both these<br>
versions?<br>
<br>
/M<br>
<br>
--<br>
Magnus Therning                      OpenPGP: 0xAB4DFBA4<br>
email: <a href="mailto:magnus@therning.org">magnus@therning.org</a>   jabber: <a href="mailto:magnus@therning.org">magnus@therning.org</a><br>
twitter: magthe               <a href="http://therning.org/magnus" target="_blank">http://therning.org/magnus</a><br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>+1 919 869 8849<br>
</div>