Re: [CMake] Faking a library

2013-10-19 Thread Magnus Therning
On Wed, Oct 16, 2013 at 11:36:53PM +0200, Alexander Neundorf wrote: On Wednesday 16 October 2013, Magnus Therning wrote: When defining a library via add_library() it's possible to link against it by just putting its name into target_link_libraries(). Is there some way of wrapping up an

Re: [CMake] Faking a library

2013-10-19 Thread Игорь Пашев
2013/10/19 Magnus Therning mag...@therning.org: Is it possible to put the include path in some property on the library as well, to avoid using a separate variable for that? SET_TARGET_PROPERTIES (target PROPERTIES VARIABLE-NAME VARIABLE-VALUE) -- Powered by www.kitware.com Please keep

Re: [CMake] Faking a library

2013-10-19 Thread Magnus Therning
On Sat, Oct 19, 2013 at 11:28:53AM +0400, Игорь Пашев wrote: 2013/10/19 Magnus Therning mag...@therning.org: Is it possible to put the include path in some property on the library as well, to avoid using a separate variable for that? SET_TARGET_PROPERTIES (target PROPERTIES VARIABLE-NAME

Re: [CMake] Faking a library

2013-10-19 Thread Nick Hutchinson
As of 2.8.12, you can set target properties on an imported library to specify its include directories, compile options etc, and these will be automatically propagated to any other target that links to it via target_link_libraries(). No more tedious faffing about with global variables like

Re: [CMake] Faking a library

2013-10-19 Thread Alexander Neundorf
On Saturday 19 October 2013, you wrote: On Sat, Oct 19, 2013 at 11:28:53AM +0400, Игорь Пашев wrote: 2013/10/19 Magnus Therning mag...@therning.org: Is it possible to put the include path in some property on the library as well, to avoid using a separate variable for that?

Re: [CMake] Faking a library

2013-10-19 Thread Magnus Therning
On Sat, Oct 19, 2013 at 08:11:52PM +0100, Nick Hutchinson wrote: As of 2.8.12, you can set target properties on an imported library to specify its include directories, compile options etc, and these will be automatically propagated to any other target that links to it via

[CMake] Faking a library

2013-10-16 Thread Magnus Therning
When defining a library via add_library() it's possible to link against it by just putting its name into target_link_libraries(). Is there some way of wrapping up an external library in a similar way? As a concrete example I'm playing around with gtest[1] via externalproject_add() like this:

Re: [CMake] Faking a library

2013-10-16 Thread Alexander Neundorf
On Wednesday 16 October 2013, Magnus Therning wrote: When defining a library via add_library() it's possible to link against it by just putting its name into target_link_libraries(). Is there some way of wrapping up an external library in a similar way? As a concrete example I'm playing