[cmake-developers] target_include_directories branch in stage

Brad King brad.king at kitware.com
Thu Feb 9 16:16:29 EST 2012


On 2/9/2012 3:45 PM, Alexander Neundorf wrote:
> Just to make completely sure: the purpose of this target property is *not*
> that targets linking against a library with this property set should reuse
> these include dirs, right ?

Correct.  It's just to allow the directory-level INCLUDE_DIRECTORIES
specification to be target-level.

> Nevertheless, did you already think about how the interface for such a feature
> could look like (to make sure it fits with this new target property) ?
> Maybe something like this ?
> set_target_properties(... PROPERTIES
>                            INCLUDE_DIRECTORIES a/ b/ c/
>                            PUBLIC_BUILD_INCLUDE_DIRECTORIES d/ e/ f/
>                            PUBLIC_INSTALL_INCLUDE_DIRECTORIES g/ h/ i/ )
>
> It would have to be possible to separate between include dirs to be used at
> build time of the library, and include dirs to be used once the library has
> been installed (similar to the build and install RPATH)
>
> ...just to make sure the syntax for the new INCLUDE_DIRECTORIES property is ok
> and doesn't make problems later on.

I think it could work the same way as linking versus LINK_INTERFACE_LIBRARIES.
Anyway, this is not a design goal for the current work and the current work's
interface is a natural extension of what is there already.

-Brad



More information about the cmake-developers mailing list