[Cmake] multi threaded libraries

Bill Hoffman bill.hoffman@kitware.com
Wed, 12 Feb 2003 11:20:49 -0500


Do you mean shared libraries?  

If so, there are two ways:

1. add an option variable to your project called BUILD_SHARED_LIBS:
OPTION(BUILD_SHARED_LIBS "Build VTK with shared libraries." ON)
If that variable exists and is ON, then cmake will produce shared libraries.

2. You can force a library to always be shared like this:
ADD_LIBRARY(foo SHARED foo.cxx)
or static:
ADD_LIBRARY(foo STATIC foo.cxx)


-Bill


At 04:42 PM 2/11/2003 +0000, Dorothy Redpath wrote:

>Could anyone please give me some advice on how to use CMake under Linux to
>create a program using multi-threaded libraries rather than standard
>libraries?
>
>Many thanks,
>David
>
>
>_______________________________________________
>Cmake mailing list
>Cmake@public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake