[CMake] ADD_LIBRARY default behavior

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


At 01:51 PM 8/30/2006, Richard Fuchs wrote:
>William A. Hoffman wrote:
>>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
>>>
>>>    
>>
>>See :
>>
>>http://www.cmake.org/Wiki/CMake_Useful_Variables
>>
>>LIBRARY_OUTPUT_PATH 
>>-Bill
>>
>>  
>
>Ah, so simple.
>
>But looking at the output, it's resulting in
>c++ -o libserialize.so "CMakeFiles/serialize.dir/ln_serialize.o" then a mv command
>instead of what I'd expect which would be
>c++ -o my_new_lib_path/libserialize.so "CMakeFiles/serialize.dir/ln_serialize.o"
>
>
>It's the same as putting a custom command after the add_library to move the .so
>
>But, it works either way.

It should not to a mv command, something else is going on, you have added
a custom command or something....  It should do a -o path/to/bin/libserialize.so.

-Bill



More information about the CMake mailing list