[CMake] INCLUDE_DIRECTORIES (command vs target property)

David Cole david.cole at kitware.com
Mon Oct 22 09:11:23 EDT 2012


If you want to APPEND, then use set_property with APPEND.

  http://cmake.org/cmake/help/v2.8.9/cmake.html#command:set_property


HTH,
David


On Mon, Oct 22, 2012 at 9:05 AM, Micha Renner <Micha.Renner at t-online.de> wrote:
> Hello,
>
> The target property INCLUDE_DIRECTORIES overwrites the
> include_directories command values.
>
> A better way would have been that the values of the include_directories
> command would appended to the values of the target property
> INCLUDE_DIRECTORIES.
> I think that would make more sense.
>
> INCLUDE_DIRECTORIES(general_include_directories)
>
> # Projet A
> ...
> SET_TARGET_PROPERTIES(ProA PROPERTIES
>         INCLUDE_DIRECTORIES ${ProjAIncludeDirs})
> ...
>
> # Projet B
> ...
> SET_TARGET_PROPERTIES(ProB PROPERTIES
>         INCLUDE_DIRECTORIES ${ProjBIncludeDirs})
> ...
>
> Grettings
>
> Micha Renner
>
>
> --
>
> 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


More information about the CMake mailing list