There is nothing like that... Unless the target has had its directory property *set* before you make the get_property call.
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)...? On Mon, Jan 17, 2011 at 9:47 PM, Pau Garcia i Quiles <pgqui...@elpauer.org>wrote: > Hello, > > If I use: > > project( blah ) > > that creates variables blah_SOURCE_DIR and blah_BINARY_DIR. > > Does anything like that exist for a *target* ? I've managed to emulate > targetname_SOURCE_DIR with: > > get_target_property(${name}_SOURCEFILES ${name} SOURCES) > list(GET ${name}_SOURCEFILES 0 ${name}_FIRST_SOURCEFILE ) > get_source_file_property(${name}_SUBDIR_FULLPATH > ${${name}_FIRST_SOURCEFILE} LOCATION) > string(REPLACE ${WT_SOURCE_DIR}/examples/ "" ${name}_SUBDIRANDSOURCE > ${${name}_SUBDIR_FULLPATH}) > string(REPLACE /${${name}_FIRST_SOURCEFILE} "" ${name}_SUBDIR > ${${name}_SUBDIRANDSOURCE}) > > However, I don't know how to emulate targetname_BINARY_DIR. I tried with: > > get_target_property(${name}_RUNTIME_OUTPUT_DIRECTORY ${name} > RUNTIME_OUTPUT_DIRECTORY) > > But I get NOTFOUND :-( > > Thank you > > -- > Pau Garcia i Quiles > http://www.elpauer.org > (Due to my workload, I may need 10 days to answer) > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake >
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake