[CMake] CMake toolchain file changing shared library loading name
Дмитрий Дороговцев
dorogovtsev.dmitriy at gmail.com
Fri Jul 19 04:41:14 EDT 2013
Hello.
I have a strange issue when cross compiling with CMake.
When i compile for host, in the resulting binary i have:
readelf -d ./test
...
0x00000001 (NEEDED) Shared library: [libfoo.so]
0x0000000f (RPATH) Library rpath: [$ORIGIN/../../lib/]
...
When i use CMake toolchain file (cmake -DCMAKE_TOOLCHAIN_FILE=arm_
test.cmake .) i have:
readelf -d ./test
...
0x00000001 (NEEDED) Shared library:
[/home/mgh/proj/test/lib/libfoo.so]
0x0000000f (RPATH) Library rpath: [$ORIGIN/../../lib/]
...
My toolchain file is very simple:
set( CMAKE_SYSTEM_NAME armLinux )
set( CMAKE_C_COMPILER arm-linux-gnueabi-gcc )
set( CMAKE_CXX_COMPILER arm-linux-gnueabi-g++ )
set( CMAKE_FIND_ROOT_PATH /home/mgh/toolchains/arm-linux-gnueabi/bin )
So my question is why path to libfoo.so has been changed in executable after
cross compiling? Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130719/c818ca85/attachment.htm>
More information about the CMake
mailing list