[Cmake] BUILD_SHARED vs BUILD_SHARED_LIBS ambiguity

William A. Hoffman billlist at nycap . rr . com
Mon, 29 Dec 2003 09:09:04 -0500


Thanks, that is a typo in the CMake book.   On page 126 BUILD_SHARED
should be BUILD_SHARED_LIBS.

If BUILD_SHARED_LIBS is set to true then it changes the default
of the ADD_LIBRARY command from STATIC to SHARED.  If STATIC
or SHARED is specified in the ADD_LIBRARY command directly 
BUILD_SHARED will not affect it.

-Bill


At 11:24 AM 12/23/2003, Bradley Lowekamp wrote:
>Hello,
>        I trying to get my project to do cross platform shared libraries. I am reading through the documentation in the CMake book and  I have found that the description of these two variables ambiguates what ADD_LIBRARY is suppose to do. I am using a very recent (in the past week) version of CMake. When I only have BUILD_SHARED as an option, it always seems to generate static libraries. When I tries setting BUILD_SHARED_LIBS based on BUILD_SHARED, it always seemed to generate shared libraries even if BUILD_SHARED_LIBS was set to STATIC.
>        So, What determines what ADD_LIBRARY is suppose to do?
>
>Thanks,
>>Brad
>
>_______________________________________________
>Cmake mailing list
>Cmake at www . cmake . org
>http://www . cmake . org/mailman/listinfo/cmake