On 11/7/2011 12:57 PM, Brad King wrote:
The INCLUDE_DIRECTORIES property of a target must be the *only* list
from which the final include directory list is constructed. When a target
is created the current directory-level include directories must be used
to initialize the list. Further include_directories() calls in the same
directory must append not only to the directory-level list but also to
the property for all existing targets. At any intermediate point a
target's property can be modified independently (see the set_property
command example below).

Alex suggested the same thing:

 
http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/39090/focus=39227

On 11/7/2011 12:23 PM, Alexander Neundorf wrote:
> I think
> get_target_properties(someVar foo INCLUDE_DIRECTORIES)
> should return the full list of include directories used for that target.
>
> This would mean that they are not really additive.
>
> Instead, the INCLUDE_DIRECTORIES target property could be initialized from the
> directory-property INCLUDE_DIRECTORIES.
> Then, to add include dirs, use
> set_property(TARGET foo  APPEND PROPERTY INCLUDE_DIRECTORIES ${bar_INCLUDES} )
>
> To set (and ignore any directory-level include dirs):
> set_property(TARGET foo  PROPERTY INCLUDE_DIRECTORIES ${blub_INCLUDES} )

-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

Reply via email to