[CMake] linking with .so w/ non-standard names
Michael Wild
themiwi at gmail.com
Fri Aug 14 01:00:00 EDT 2009
Perhaps something like this:
set( CMAKE_SHARED_LIBRARY_PREFIX_bak ${CMAKE_SHARED_LIBRARY_PREFIX} )
set( CMAKE_SHARED_LIBRARY_PREFIX )
find_library( ABCD_LIBRARY abcd )
set( CMAKE_SHARED_LIBRARY_PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX_bak} )
....
target_link_libraries( a.out ${ABCD_LIBRARY} )
HTH
Michael
On 14. Aug, 2009, at 0:16, Clinton Stimpson wrote:
>
> How about this:
> target_link_libraries(a.out /path/to/abcd.so)
> If you use find_library(), then you should be getting full names
> already.
>
> Clint
>
> Kenneth Chang wrote:
>> Hi,
>>
>> I have this third party library that has a .so named like abcd.so
>> instead of libabcd.so. Putting the name in
>>
>> target_link_libraries( a.out abcd.so )
>>
>> doesn't work because this generates -labcd on the link line and
>> then ld can't find it. What do I need to do to get this to link?
>>
>> Thanks!
>> Kenny
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list