---------- Forwarded message ----------
From: Eric Noulard <[email protected]>
Date: 2012/5/18
Subject: Re: [CMake] Build shared and static in one build
To: [email protected]


2012/5/18 Totte Karlsson <[email protected]>:
> Hi,
>
> How does one gey a setup where both a static and shared version of a library
> is built in 'one go' in CMake? Is that possible?

set(LIBSRC blah.c bouh.c)

add_library(MyLib SHARED ${LIBSRC})

add_library(MyLib-static STATIC ${LIBSRC})
set_target_properties(MyLibStatic PROPERTIES OUTPUT_NAME MyLib)

should work
--
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org


-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to