There is nothing like that... Unless the target has had its directory property *set* before you make the get_property call.<br><br><div>Why do you need this? What's your use case where the name of a target is known, but the name of its containing project is unknown (presumably)...?</div>
<div><br></div><div><br><div class="gmail_quote">On Mon, Jan 17, 2011 at 9:47 PM, Pau Garcia i Quiles <span dir="ltr"><<a href="mailto:pgquiles@elpauer.org">pgquiles@elpauer.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<br>
<br>
If I use:<br>
<br>
project( blah )<br>
<br>
that creates variables blah_SOURCE_DIR and blah_BINARY_DIR.<br>
<br>
Does anything like that exist for a *target* ? I've managed to emulate<br>
targetname_SOURCE_DIR with:<br>
<br>
get_target_property(${name}_SOURCEFILES ${name} SOURCES)<br>
list(GET ${name}_SOURCEFILES 0 ${name}_FIRST_SOURCEFILE )<br>
get_source_file_property(${name}_SUBDIR_FULLPATH<br>
${${name}_FIRST_SOURCEFILE} LOCATION)<br>
string(REPLACE ${WT_SOURCE_DIR}/examples/ "" ${name}_SUBDIRANDSOURCE<br>
${${name}_SUBDIR_FULLPATH})<br>
string(REPLACE /${${name}_FIRST_SOURCEFILE} "" ${name}_SUBDIR<br>
${${name}_SUBDIRANDSOURCE})<br>
<br>
However, I don't know how to emulate targetname_BINARY_DIR. I tried with:<br>
<br>
get_target_property(${name}_RUNTIME_OUTPUT_DIRECTORY ${name}<br>
RUNTIME_OUTPUT_DIRECTORY)<br>
<br>
But I get NOTFOUND :-(<br>
<br>
Thank you<br>
<br>
--<br>
Pau Garcia i Quiles<br>
<a href="http://www.elpauer.org" target="_blank">http://www.elpauer.org</a><br>
(Due to my workload, I may need 10 days to answer)<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></div>