[CMake] ADD_LIBRARY default behavior

Richard Fuchs fuchsrich at se-core.net
Wed Aug 30 11:06:33 EDT 2006


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?

Thanks
Richard


More information about the CMake mailing list