[CMake] ADD_LIBRARY default behavior

William A. Hoffman billlist at nycap.rr.com
Wed Aug 30 13:09:32 EDT 2006


At 11:06 AM 8/30/2006, Richard Fuchs wrote:
>I want to be able to create my libraries in a different directory instead of the current_bin_dir
>
>For example:
>ADD_LIBRARY(serialize SHARED ${SERIALIZE_SRCS})
>creates current_bin_dir/libserialize.so
>
>But if I try:
>ADD_LIBRARY(/all_my_lib_files/serialize SHARED ${SERIALIZE_SRCS})
>instead of getting /all_my_lib_files/libserialize.so I get a error telling me that lib/all_my_lib_files/serialize.so cannot be created.
>
>I can move the library after it's created, that's not a big deal, but I just wanted to see if anyone else has run into this, or if I'm just doing something weird.
>
>Maybe an LIB_DIR option in ADD_LIBRARY would work?

See :

http://www.cmake.org/Wiki/CMake_Useful_Variables

LIBRARY_OUTPUT_PATH 

-Bill



More information about the CMake mailing list