I'm working on a module that needs to interrogate a target, and get it's source directory, defines, cflags, and libraries that it links to.
So far, all I've been able to do is get the sources, which are relative to the source directory of the target. I have not been able to get the source directory of the target, so I'm essentially stuck. I've tried using the LOCATION property on the target, but alas that only gives me the output location. I've tried to get the absolute path of a source file using get_filename_component for the ABSOLUTE property, but it just tacks on the source filename to the current working directory, which obviously doesn't work. There is one idea I've had to fix this, but it's by no means ideal, and that's to have each target set a property named SOURCE_LOCATION or something, to CMAKE_CURRENT_SOURCE_DIR but that seems like a huge inconvenience for potential users. Any thoughts? -- Gary Kramlich <g...@reaperworld.com>
signature.asc
Description: OpenPGP digital signature
-- 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