cmake and RPATH

Alexander Neundorf neundorf at kde.org
Sun Feb 5 17:20:41 CET 2006


Hi,

an idea regarding the RPATH issue:

I guess on windows it will be good enough if the libraries and the executables 
are created in the same directory. The the linker should find the libraries.

On e.g. linux:
let all libraries be created in the same output directory, and for the 
executables a simple shell script is created, e.g. for kde-config:

#!/bin/sh
LD_LIBRARY_PATH=/home/alex/src/kdelibs-build/lib /home/alex/kdelibs-build/bin/kde-config

If other systems use other variables than LD_LIBRARY_PATH (e.g. 
DYLD_LIBRARY:PATH on OS X) then the script has to use this other variable.

You can find a simple example in the attached file, it works for this example.
The extra calls like configure_file() and chosing between LD_LIBRARY_PATH and 
DYLD_LIBRARY_PATH can be hidden without problems in the kde4_add_executable() 
macro.

What do you think about this ?

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake-rpath.tar.gz
Type: application/x-tgz
Size: 653 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20060205/b1632b66/attachment.bin 


More information about the Kde-buildsystem mailing list