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:
You can create imported libraries with the add_library command using
the IMPORTED option.
I have very quick example at:
https://github.com/robertmaynard/Sandbox/blob/master/ImportedLibrary/CMakeLists.txt
On Wed, Oct 16, 2013 at 5:00 PM, Magnus Therning wrote:
> When defining a library via add_li
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
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 e
2013/10/19 Magnus Therning :
> 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 )
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http:
On Sat, Oct 19, 2013 at 11:28:53AM +0400, Игорь Пашев wrote:
> 2013/10/19 Magnus Therning :
> > 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 )
Of course, but then how
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 GTEST_INC
On Saturday 19 October 2013, you wrote:
> On Sat, Oct 19, 2013 at 11:28:53AM +0400, Игорь Пашев wrote:
> > 2013/10/19 Magnus Therning :
> > > 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_PROPER
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 target_link_librar