[CMake] shared and static library
Xavier Delannoy
xavier.delannoy at netasq.com
Thu Feb 2 10:38:09 EST 2006
On Thu, 02 Feb 2006 15:02:00 +0000
Mike Talbot <mtalbot at abingdon.oilfield.slb.com> wrote:
> I believe that if you don't specify STATIC or SHARED in the ADD_LIBRARY
> command, then you can control whether libraries are built as shared or
> static via the BUILD_SHARED_LIBS variable. If you set this to true in
> your cache, then all libraries in your project that aren't explicitly
> STATIC will be built as shared and vice-versa.
>
> something like this should do it:
>
> cd static_lib_dir
> cmake -D BUILD_SHARED_LIBS:BOOL=FALSE ../srcdir
>
> cd shared_lib_dir
> cmake -D BUILD_SHARED_LIBS:BOOL=TRUE ../srcdir
this is exactly what I've tried.
--
Xavier Delannoy
R&D engineer
xavier.delannoy at netasq.com
http://www.netasq.com
Tél : +33 320 619 742
Fax : +33 320 619 639
More information about the CMake
mailing list