[CMake] creating a shared and static library of the same
name
William A. Hoffman
billlist at nycap.rr.com
Mon May 15 08:44:09 EDT 2006
At 06:43 AM 5/15/2006, Michael Biebl wrote:
>Hi everybody,
>
>is it possible to create a shared and static library with the same name?
>I tried the folllowing:
>
>ADD_LIBRARY(foo SHARED foo.c)
>
>ADD_LIBRARY(foo_static STATIC foo.c)
>SET_TARGET_PROPERTIES(foo_static PROPERTIES OUTPUT_NAME foo)
>
>But if I then add
>
>ADD_EXECUTABLE(bar bar.c)
>TARGET_LINK_LIBRARIES(bar foo) (I want to link it dynamically against
>libfoo.so)
What version of cmake are you using? This is only supported in 2.4 and greater.
-Bill
More information about the CMake
mailing list