KDE/kdelibs

Tanner Lovelace clubjuggler at gmail.com
Sun Jan 22 21:26:06 CET 2006


On 1/22/06, Alexander Neundorf <neundorf at kde.org> wrote:
> SVN commit 501129 by neundorf:
>
> kdelibs/ compile now with cmake (except khtml/ due to kxmlcore and gcc 3.2) on my machine
> I'll do some more finetuning, so:
>
> PLEASE DONT TRY TO COMPILE THIS YET, I'LL LET YOU KNOW

I always did have a problem following instructions. :-)

So, I decided to try this out under OS X with native Qt/Mac.  With just 3
changes to the cmake files, I was able to get the cmake configure step
to run correctly (patch attached, feel free to take or leave it as you will).
However, it appears that FindQt4.cmake needs a bit more work for
Qt/Mac set up as native OS X frameworks because as soon as I tried
to compile, it bombed.  I have a good idea, however, of what needs to
be done for that, so I'll see if I can post a patch for that to the cmake folks
soon.  Here are more details for the morbidly curious. :-)

* OS X 10.3.9, gcc 3.3, Qt 4.1.0 installed as OS X frameworks

* The three changes to the kdelibs cmake files are
1. Add find_package(Qt4 REQUIRED) to the start of the top CMakeLists.txt file
   (otherwise cmake fails on not finding qt4_generate_moc and qt4_add_resources)
2. In ConfigureChecks.cmake, I added /usr/X11R6/lib as another directory to be
   searched for ICE_LIB.  Ben Reed, however, mentioned that this may be not
   necessary since dcop should include it's own version of ice which
would probably
   be preferrable over the X11 version since the OS X port shouldn't
be using X11.
3. In kded/CMakeLists.txt I commented out kbuildimageiofactory.cpp as a source
   file since for some reason I don't seem to have it in my subversion checkout.

* I did also modify FindQt4.cmake to surround the find_package(x11) with
  (UNIX AND NOT APPLE) instead of just (UNIX) since OS X is unix but Qt
  doesn't depend on X11 there.

* The problem with Qt as OS X frameworks appears to be one of include files.
  OS X frameworks combine library files and header files and when including them
  you include the framework name as the first part of the path in the
include statement
  like this:

#include <QtCore/qstring.h>

  The actual header file, however, is in
  [framework directory]/QtCore.Framework/Headers/qstring.h.  The
compiler can figure
  out where to find the header file, but instead of passing an include
directory in a
  -I [includedir] argument to gcc you must pass the framework directory in a
  -F [frameworkdirectory] argument.  This is what FindQt4.cmake seems
to be lacking.

Overall, though, I'm very encouraged.  I haven't yet tried the cmake XCode
generator, just regular makefiles.  I'd really like to be able to
compile kde with
XCode.

Cheers,
Tanner Lovelace
--
Tanner Lovelace
clubjuggler at gmail dot com
http://wtl.wayfarer.org/
(fieldless) In fess two roundels in pale, a billet fesswise and an
increscent, all sable.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs-cmake-osx.diff
Type: application/octet-stream
Size: 1209 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20060122/d2bd5b42/attachment.obj 


More information about the Kde-buildsystem mailing list