cmake news: RPATH, kdevelop projects, finding kdelibs

Alexander Neundorf neundorf at kde.org
Thu Mar 16 22:30:59 CET 2006


Hi,

for everybody who is using cmake to compile kde 4 stuff: please consider 
updating to current cmake cvs.

What's new:

I added support for different RPATH handling styles, they are selected by 
setting RPATH_STYLE (either using ccmake or -DRPATH_STYLE=<your_choice>)
The options are:

"none" - don't use RPATH at all
When installed, the libs have to be in the system library path 
(ld.so.conf/LD_LIBRARY_PATH)
To run the executables during the build, simple wrapper shell scripts are 
created which set (DY)LD_LIBRARY_PATH accordingly.

"install" - (not on OS X)
Compile with RPATH set to the installation directory, the kde library 
directory and the Qt library directory.
To run the executables during the build, simple wrapper shell scripts are 
created which set (DY)LD_LIBRARY_PATH accordingly.

"both" - (not on OS X)
Compile with RPATH set to the build directory, the installation directory, the 
kde library directory and the Qt library directory.
Executables can simply be run during the build. If both libs, the installed 
and the not-yet-installed ones are available, the not-yet-installed ones are 
prefered. This is probably mostly useful for developers.

"default" or everything else:
Compile with RPATH set to the builddir, link again when installing and set  
RPATH to the install dir, the kde lib dir and the Qt lib dir.

I couldn't test, but I hope I got things right so it works on OS X too.

Is there anything I missed ?

---------------------------------

Also in kdebase you can now generate kdevelop project files for all 
subprojects by running cmake with -GKDevelop3

---------------------------------

In kdelibs/CMakeLists.txt there is now a file KDELibsDependencies.cmake 
created, which lists all dependencies of all libs of kdelibs, and the install 
directories of kdelibs. This file gets installed and is included by 
FindKDE4Internal.cmake when compiling stuff!=kdelibs.
The install dirs are then used as first choice for finding the kde 4 libs, 
headers and executables.
Laurent: LIB_KPARTS, LIB_KIO etc. should be removed and instead 
KDE4_KPARTS_LIBRARIES, KDE4_KIO_LIBRARIES etc. should be used. I prepared 
these variables already FindKDE4Internal.cmake . Also "kparts", "kio", 
"kdecore" etc. should not be used directly in modules different from 
kdelibs/, since then the depending libs might be missing. This is "fixed" by 
using KDE4_XXX_LIBRARIES(), they contain everything requried.
The am2cmake script should be changed accordingly.

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