[CMake] Fwd: Build shared and static in one build
Eric Noulard
eric.noulard at gmail.com
Thu May 17 18:29:16 EDT 2012
---------- Forwarded message ----------
From: Eric Noulard <eric.noulard at gmail.com>
Date: 2012/5/18
Subject: Re: [CMake] Build shared and static in one build
To: totte at dunescientific.com
2012/5/18 Totte Karlsson <totte at dunescientific.com>:
> 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
More information about the CMake
mailing list