Thanks for your help!<div>It&#39;s works, and it seems great!!</div><div><br></div><div>I just try this command using 2.8.11-rc1:</div><div><br></div><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="color:#808000">target_include_directories</span>(<span style="color:#800000">${target_php}<br>

</span><span style="color:#c0c0c0"></span>    PRIVATE<span style="color:#c0c0c0"> </span><span style="color:#008000">&quot;</span><span style="color:#800000">${CMAKE_CURRENT_SOURCE_DIR}</span><span style="color:#008000">;</span><span style="color:#800000">${CMAKE_CURRENT_BINARY_DIR}</span><span style="color:#008000">/SWIG;</span><span style="color:#800000">${PHP5_INCLUDE_PATH}</span><span style="color:#008000">&quot;<br>

</span>)</blockquote>

<div>It&#39;s cool!</div><div><br></div><div class="gmail_quote">2013/3/22 Stephen Kelly <span dir="ltr">&lt;<a href="mailto:steveire@gmail.com" target="_blank">steveire@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">Yuchen Deng wrote:<br>
<br>
&gt; hi, there!<br>
&gt; I was reading the release log in here:<br>
&gt; <a href="http://www.kitware.com/news/home/browse/CMake" target="_blank">http://www.kitware.com/news/home/browse/CMake</a>?<br>
2012_11_07&amp;CMake+2.8.10+Just+Released<br>
&gt; Add see the parts:<br>
&gt;<br>
&gt;&gt; Generator expressions, which are used to introduce conditional statements<br>
&gt;&gt; at generate time rather than at CMake compile time, are now available in<br>
</div>&gt;&gt; more contexts, *notably in the INCLUDE_DIRECTORIES and<br>
&gt;&gt; COMPILE_DEFINITIONS target properties.* There are also new generator<br>
<div class="im">&gt;&gt; expressions available in the 2.8.10 release.<br>
&gt;<br>
&gt; In many times, I have to add more target in one CMakeLists.txt.<br>
&gt;<br>
&gt; My question:<br>
&gt; How to use for INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS target<br>
&gt; properties ?<br>
&gt; Any examples? tests? or docs?<br>
&gt; Thanks!<br>
&gt;<br>
<br>
</div>Hi there,<br>
<br>
I&#39;m impressed that you ask for the tests for this stuff. That&#39;s where I look<br>
too when I want to find out how to use something. :)<br>
<br>
The relevant tests in the cmake repo are in<br>
<br>
 Tests/CMakeCommands/*<br>
 Tests/GeneratorExpressions<br>
 Tests/CompileDefinitons/target_prop<br>
 Tests/IncludeDirectories/TargetIncludeDirectories<br>
 Tests/ExportImport<br>
<br>
The target_include_directories is the more &#39;high level&#39; API around the more<br>
low-level INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS properties in the<br>
other tests.<br>
<br>
See the docs like<br>
<br>
 cmake --help-property INTERFACE_INCLUDE_DIRECTORIES<br>
 cmake --help-property INTERFACE_COMPILE_DEFINITIONS<br>
 cmake --help-variable CMAKE_BUILD_INTERFACE_INCLUDES (note that this will<br>
be renamed to CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE soon)<br>
<br>
See also more information here:<br>
<br>
 <a href="http://thread.gmane.org/gmane.comp.kde.devel.buildsystem/7778" target="_blank">http://thread.gmane.org/gmane.comp.kde.devel.buildsystem/7778</a><br>
<br>
Thanks for trying the stuff out,<br>
<br>
Steve.<br>
<br>
<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><div>Best Regards</div>
<div>Yuchen</div><div></div>
</div>