[CMake] rpath and BSD
Pierre Chifflier
chifflier at cpe.fr
Thu Nov 9 08:32:15 EST 2006
Hi,
I am converting my FTP server (wzdftpd) to cmake, and have
successfully converted most of the project from automake.
One of the remaining problems is that cmake seems to ignore RPATH
parameters on *BSD systems: I tried various combinations of the
variables CMAKE_INSTALL_RPATH, CMAKE_SKIP_BUILD_RPATH,
CMAKE_BUILD_WITH_INSTALL_RPATH and CMAKE_INSTALL_RPATH_USE_LINK_PATH,
but couldn't get it to work: the resulting executable has no rpath
set, whatever I try.
The project contains a shared library and an executable, and some
tests. The exe and the tests needs to have the rpath value set
correctly, or the test fails.
I would like to set the rpath to the installation directory (and if
possible, also add the build directory). The following seems to work
on Linux:
SET_TARGET_PROPERTIES(wzdftpd PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
However, it does not on OpenBSD, for ex:
pollux:~/DEL/sbin objdump -x wzdftpd| grep -i rpath
pollux:~/DEL/sbin
What is the correct way to set the rpath ?
Thanks,
Pierre
More infos:
cmake version 2.4-patch 3
OpenBSD 3.9 GENERIC#1 i386
gcc 3.3.5
gnu ld version 2.15
The complete app code can be found on:
http://svn.cpe.fr/wsvn/wzdftpd/trunk/
anonymous svn access:
svn co svn://svn.cpe.fr/svn/wzdftpd/trunk wzdftpd
More information about the CMake
mailing list