cmake and installed binaries

Alexander Neundorf neundorf at kde.org
Fri Feb 3 17:37:37 CET 2006


Hi,

On Friday 03 February 2006 16:21, 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.

Yes, in kdelibs/ cmake compiles with RPATH set. I guess you remember the 
discussion a few weeks ago, but this linking stuff was too advanced for me, 
so I just went for the simple solution.

Currently in kdelibs/ the libraries are created in <builddir>/lib/ . I don't 
know how it works under OS X and Windows. Maybe it would already work on 
these systems if simply the binaries and libraries would be created in the 
same output directory, e.g. <builddir>/bin/ (I think at least on windows this 
would work).
Is it possible on Linux/BSD/etc. to tell the linker always to look also in the 
directory where the binary is located ?

Other than that, would it be acceptable to require that 
<kdelibs-builddir>/bin/ has to be added to LD_LIBRARY_PATH when compiling 
kdelibs/ ?

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net


More information about the Kde-buildsystem mailing list