[CMake] Per-target include dirs that work in both 2.8.7 and 188.8.131.52?
jchris.fillionr at kitware.com
Thu Feb 28 15:19:48 EST 2013
As already mentioned, the target property INCLUDE_DIRECTORIES has been
introduced in CMake 2.8.8. The following page is useful to find out such
To get around it, as mentioned by Bill, you could probably create on folder
per target and call include_directories() in each folder.
An other option could be to create a wrapper around the "add_target"
command that would create a directory, write a CMakeLists and then call
On Thu, Feb 28, 2013 at 3:32 AM, Magnus Therning <magnus at therning.org>wrote:
> The other day I was putting together some cmake files and made them
> work on my system, where I have version 184.108.40.206 installed. After
> giving my work to a colleague he reported that it didn't work. It
> came down to him using version 2.8.7 (comes with his Linux distro) and
> my use of
> set_property( TARGET app PROPERTY INCLUDE_DIRECTORIES
> In the folder in question there is source for several different
> targets, so I'd really like to use per-target include dirs (i.e.
> include_directories would not be a good match). Is there a mechanism
> for (easily) getting per-target include dirs that work in both these
> Magnus Therning OpenPGP: 0xAB4DFBA4
> email: magnus at therning.org jabber: magnus at therning.org
> twitter: magthe http://therning.org/magnus
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> Please keep messages on-topic and check the CMake FAQ at:
> Follow this link to subscribe/unsubscribe:
+1 919 869 8849
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the CMake