[CMake] building both static and dynamic versions of a library

William A. Hoffman billlist at nycap.rr.com
Fri Jan 21 08:32:11 EST 2005


I suppose the way to do this would be to put the ADD_LIBRARY statements in separate
directories and make sure the library name is different.   

-Bill


At 05:16 PM 1/20/2005, Graham Clark wrote:

>Hi everyone,
>
>Our project consists of several executables, many of which use our own
>libraries. We'd like some of these executables to be statically linked
>against our libraries, and other executables to be dynamically
>linked. Is it possible to have cmake build both static and dynamic
>versions of a library? Using two ADD_LIBRARY statements in one
>CMakeLists.txt file results in the first taking precedence and the
>second being ignored.
>
>Thanks a lot!
>Graham
>_______________________________________________
>CMake mailing list
>CMake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake 



More information about the CMake mailing list