cmake and installed binaries
Brad King
brad.king at kitware.com
Fri Feb 3 16:30:44 CET 2006
David Faure wrote:
> I thought cmake had a solution for "running uninstalled binaries" (like our kconfig_compiler program),
> while still being able to run installed binaries of course.
>
> But at the moment, uninstalled binaries link to the libs in the builddir, and when installing
> they still do that - not good...
>
> /devel/kde/build/4/kdelibs4_cmake> ldd bin/kconfig_compiler| grep kdecore
> libkdecore.so.4 => /devel/kde/build/4/kdelibs4_cmake/lib/libkdecore.so.4 (0xb7b4d000)
>
> /> ldd /usr/local/bin/kconfig_compiler| grep kdecore
> libkdecore.so.4 => /devel/kde/build/4/kdelibs4_cmake/lib/libkdecore.so.4 (0xb7b51000)
>
> export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH doesn't change that.
This is the classic rpath problem. The current CMake code for KDE is
setup to build with rpaths pointing to the build tree so that developers
can run it from there. You can enable the CMake cache option
CMAKE_SKIP_RPATH and then no rpaths will be put in the binaries. In
order to run it from the build tree you'll then have to set
LD_LIBRARY_PATH yourself.
See this message for a more detailed discussion:
http://mail.kde.org/pipermail/kde-buildsystem/2006-January/000445.html
The KDE CMake code can be updated to set CMAKE_SKIP_RPATH itself to make
this the default behavior.
-Brad
More information about the Kde-buildsystem
mailing list