[CMake] CMake toolchain file changing shared library loading name

Дмитрий Дороговцев dorogovtsev.dmitriy at gmail.com
Fri Jul 19 05:31:11 EDT 2013


2013/7/19 Nils Gladitz <nilsgladitz at gmail.com>

>  Does /home/mgh/proj/test/lib/libfoo.so not have a SONAME while your
> native libfoo.so does?
>
> The linker may use the SONAME when available and might fall back to the
> path as seen on the command line (/home/mgh/proj/test/lib/libfoo.so)
> otherwise?
>
> Nils
>


Yes, you are totally right! I have explicitly set soname to library with
set( CMAKE_SHARED_LINKER_FLAGS "-Wl,-soname,libfoo.so" )
and after this final executable shows its dependencies as host one.
Thank you very much. I have one more question, though: should I
set soname every time explicitly or this should be done by toolchain
linker?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130719/a638f20e/attachment.htm>


More information about the CMake mailing list