AW: [CMake] Creating librarys with different names from their targets.

Gerhard Grimm ggrimm at detec.de
Wed Nov 28 08:02:11 EST 2007


Hi Josef,
 
try this:
 
add_library(Foo.Code source.cpp)
set_target_properties(Foo.Code PROPERTIES OUTPUT_NAME Foo)
 
It should create a target "Foo.Code" building a library "Foo.lib".
 
Best regards, Gerhard

-----Ursprüngliche Nachricht-----
Gesendet: Mittwoch, 28. November 2007 13:53
An: cmake at cmake.org
Betreff: [CMake] Creating librarys with different names from their targets.



I've got a library which I want to build from a target which has a different name.  Is there any way of doing this?

 

If I do,

 

ADD_LIBRARY(Foo source.cpp)

 

this creates a target called 'Foo' which builds 'Foo.lib'.  However I want the library 'Foo.lib' to be built from a target call 'Foo.Code'.  Is this possible?  (I've not explained the whole picture as it's more complicated than this).

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20071128/8c73227e/attachment.html


More information about the CMake mailing list