On 2/24/2012 1:56 PM, Clinton Stimpson wrote:
What about a more generic approach like the following?
add_library(foo IMPORTED ...)
set_target_properties(foo PROPERTIES
DEPENDENT_COMPILE_DEFINITIONS "FOO_DEFINE"
DEPENDENT_INCLUDE_DIRECTORIES "/path/to/foo/include")
add_executable(bar ...)
target_link_libraries(foo bar)
And that could automatically add -DFOO_DEFINE and -I/path/to/foo/include to
the bar executable.
So basically any DEPENDENT_<property> can be pushed to<property> on the other
target.
Nice. This is exactly the kind of interface I had in mind for the
"usage requirements" approach Alex and I were discussing elsewhere
in this thread. We will have to think about how to define transitive
properties of these requirements though.
-Brad
--
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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers