[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    [CMake] QT4/5_WRAP_CPP / INTERFACE_INCLUDE_DIRECTORIES
From:       "Christian Ehrlicher" <Ch.Ehrlicher () gmx ! de>
Date:       2017-04-06 14:18:34
Message-ID: trinity-0abd34d7-c1ce-4e88-903a-bfffaa17ecd1-1491488314487 () 3capp-gmx-bs65
[Download RAW message or body]

[Attachment #2 (text/html)]

<html><head></head><body><div style="font-family: Verdana;font-size: \
12.0px;"><div>Hi,</div>

<div>&nbsp;</div>

<div>I wonder if it is a documentation error or an error in QT4/5_CREATE_MOC_COMMAND. \
The documentation states, that INTERFACE_INCLUDE_DIRECTORIES is taken from the given \
target but the code says, that INCLUDE_DIRECTORIES is used:</div>

<div>
<pre><span class="n">If</span> <span class="n">the</span> <span \
class="o">&lt;</span><span class="n">tgt</span><span class="o">&gt;</span> <span \
class="ow">is</span> <span class="n">specified</span><span class="p">,</span> <span \
class="n">the</span>  <span class="n">INTERFACE_INCLUDE_DIRECTORIES</span> <span \
class="ow">and</span> <span class="n">INTERFACE_COMPILE_DEFINITIONS</span> <span \
class="kn">from</span>  <span class="nn">the</span> <span class="o">&lt;</span><span \
class="n">tgt</span><span class="o">&gt;</span> <span class="n">are</span> <span \
class="n">passed</span> <span class="n">to</span> <span class="n">moc</span><span \
class="o">.</span></pre>

<div>Code:</div>

<div>set(targetincludes \
&quot;&#36;&lt;TARGET_PROPERTY:&#36;{moc_target},INCLUDE_DIRECTORIES&gt;&quot;)</div>

<div>&nbsp;</div>

<div>&nbsp;</div>

<div>The two properties have different content and when I use an INTERFACE library as \
target, it does not work (forbidden property):</div>

<div>
<div>TARGET_INCLUDE_DIRECTORIES(foo<br/>
&nbsp; PUBLIC<br/>
&nbsp;&nbsp;&nbsp; /home/public<br/>
&nbsp; INTERFACE<br/>
&nbsp;&nbsp;&nbsp; /home/interface<br/>
&nbsp; PRIVATE<br/>
&nbsp;&nbsp;&nbsp; /home/private<br/>
)<br/>
get_target_property(targetincludes foo INTERFACE_INCLUDE_DIRECTORIES)<br/>
message(STATUS &quot;ifc incl: &#36;{targetincludes}&quot;)<br/>
get_target_property(targetincludes foo INCLUDE_DIRECTORIES)<br/>
message(STATUS &quot;incl: &#36;{targetincludes}&quot;)</div>

<div>--&gt;<br/>
-- ifc incl: /home/public;/home/interface<br/>
-- incl: /home/public;/home/private</div>

<div>&nbsp;</div>

<div>Thx,</div>

<div>Christian</div>
</div>
</div></div></body></html>



-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: \
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at \
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic