[CMake] ADD_LIBRARY default behavior

Richard Fuchs fuchsrich at se-core.net
Wed Aug 30 15:07:49 EDT 2006


William A. Hoffman wrote:
> 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
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
>   
Sorry, I was looking at the output from the wrong library (the one that 
had the custom command and not the one I changed to use the 
LIBRARY_OUTPUT_PATH).  It works just the way it should.

Thanks


More information about the CMake mailing list