[Cmake] mixing shared and static libraries

Bill Hoffman bill.hoffman at kitware.com
Tue Feb 19 16:24:21 EST 2002


BUILD_SHARED_LIBS is a global, and can only be used for the entire project.

If you want to force a specific library type, you can do
it with the ADD_LIBRARY command.  ADD_LIBARY(foo SHARED foo_SRCS)
or ADD_LIBRARY(foostatic STATIC foo_SRCS)

-Bill


At 09:06 PM 2/19/2002 +0000, you wrote:
>Is it possible to build shared libraries in some directories and static
>libraries in others?
>
>I have set BUILD_SHARED_LIBS to no in my root cmakelists.txt file. Then
>setting it to YES in one of the subdirectories does not appear to have an
>effect.
>
>Also, can we specify different build settings for a single file in a
>directory?
>
>Thanks,
>Ian.
>
>_______________________________________________
>Cmake mailing list
>Cmake at public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake 




More information about the CMake mailing list