[CMake] CMake toolchain file changing shared library loading name
Nils Gladitz
nilsgladitz at gmail.com
Fri Jul 19 05:54:39 EDT 2013
When the library is being created by CMake itself I would have expected
a SONAME by default:
"Default is to set "soname" on all shared libraries and modules as long
as the platform supports it."
Is armLinux a valid value for CMAKE_SYSTEM_NAME?
Quick glimpse at some documentation suggests you may want "Linux"
instead since there are no armLinux platform files.
I assume that may also set the proper flags for SONAME to work by default(?)
Nils
On 07/19/2013 11:31 AM, Дмитрий Дороговцев wrote:
>
>
> 2013/7/19 Nils Gladitz <nilsgladitz at gmail.com
> <mailto: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/d040c244/attachment.htm>
More information about the CMake
mailing list