experimental support for building kdelibs 4 with cmake

Alexander Neundorf neundorf at kde.org
Sun Jan 15 21:41:26 CET 2006


Hi,

On Sunday 15 January 2006 21:27, David Faure wrote:
> On Sunday 15 January 2006 18:59, Alexander Neundorf wrote:
> > cmake .
>
> Does cmake support srcdir != builddir? This would be convenient to test
> compiling the same kdelibs source tree with the three build systems :-)

Yes. Run cmake in another directory:
E.g. with the sources in ~/src/kdelibs/

$ cd ~/src/kdelibs-build/
$ cmake ~/src/kdelibs/

Of course all cmake functions have to be written correctly to work with 
builddir != srcdir, i.e. all macros which deal with creating files have to 
use CMAKE_SOURCE_DIR, CMAKE_CURRENT_SOURCE_DIR, CMAKE_BINARY_DIR and 
CMAKE_CURRENT_BINARY_DIR accordingly.
For the beginning I'm testing with srcdir==buildir, should make things a bit 
easier. 
Here is an overview over cmake variables: 
http://www.cmake.org/Wiki/CMake_Useful_Variables

> > -- Looking for _IceTransNoListen in ICE_LIB-NOTFOUND
> > CMake Error: This project requires some variables to be set,
> > and cmake can not find them.
> > Please set the following variables:
> > ICE_LIB
> >
> > CMake Error: Internal CMake error, TryCompile configure of cmake failed
> > -- Looking for _IceTransNoListen in ICE_LIB-NOTFOUND - not found
>
> Why look for ICE_LIB when kdelibs has its own?

Well, I don't know. I just saw that there are some tests for this function and 
so tried to reimplement it. If it isn't used anyway then the test isn't 
required.
In your case the system libICE wasn't found. This is done using 
find_library(LIB_ICE NAMES ICE ... PATHS ...) in ConfigureChecks.cmake .
In the list of paths the path to the location of libICE on your system is 
missing. This is probably also the case for the other FindXXX.cmake files in 
kdesdk/modules/. 
They have to be extended.
Eventually implementing support for pkgconf can be considered.

> > -- Looking for include files HAVE_TERMIO_H
> > -- Looking for include files HAVE_TERMIO_H - found
>
> Can this be merged into a single line? :)

Hmm, that's the standard output from the cmake modules. We could probably bug 
the cmake devs to change this but I would consider this insignificant.

Hint: please don't try to compile something yet, these are only the 
autogenerated files, they need manual tweaking (I'm just doing this right 
now). I'll give you an update once it works in some way.

For now I'd mainly like to get some feedback to the "API".

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