Building KDE/Mac
From WayfarerWiki
Note that these notes are extremely out of date (Oct 2007) See project page for up to date information.
My notes about the process of building KDE/Mac on OS X Tiger (10.4.x).
Contents |
Prerequisites
Apple Developer Tools
Download and install the latest Apple Developer Tools.
Qt
Native KDE/Mac is built with the native Qt/Mac toolkit. No X11 is required.
Setup
- Download the latest qt mac version from Trolltech.
- Checkout the patches directory from the KDE subversion repository
- Untar Qt somewhere and apply all the patches in the top patches directory.
Compile
To see what options are available you can do:./configure -helpModify your options as needed.
In the patched Qt/Mac directory I generally do the following commands
./configure -fast -qt-gif make sudo make install
This will configure Qt/Mac with GIF support and as native OS X frameworks and install it in /usr/local/Trolltech/Qt-VERSION/
Make sure /usr/local/Trolltech/Qt-VERSION/bin is in your path and that you can run qmake.
CMake
./configure make sudo make install
This will bootstrap it, build it and install it in /usr/local.
Make sure /usr/local/bin is in your path.
Other packages
KDE requires other libraries and toolkits to compile and run. These can be installed in several different way. The easiest way is to use a package manager. There are two package managers for Unix style software under OS X: Darwinports and Fink.
Darwinports
Download and install the base Darwinports setup. Make sure you get the correct one for your system.
After installing, make sure /opt/local/bin is in your path and run
sudo port sync sudo port -d selfupdate
to make sure your setup is up to date.
- Necessary packages include: jpeg, libxml2, libxslt, libungif, libpng ADD MORE HERE
- Useful packages include: ccache (place /opt/local/ccache/bin in your path before /usr/bin), distcc.
Fink
TODO
From source
TODO
Building KDE
Obtaining the source
- Checkout kdelibs from the KDE subversion
Configuring
CMake can create standard unix makefiles or XCode projects. To specify which generator CMake should use, supply the -G parameter. This page will assume the use of Unix Makefiles.
- Create a new directory to build in (builddir != srcdir)
- In the build directory, execute the following command
CMAKE_LIBRARY_PATH=/opt/local/lib \ CMAKE_INCLUDE_PATH=/opt/local/include \ cmake \ /path/to/kdelibsNotes: At one point, I also had to add
-DCMAKE_REQUIRED_INCLUDES:STRING=/opt/local/include \ -DCMAKE_REQUIRED_LIBRARIES:STRING=/opt/local/libbetween the cmake command and the path to kdelibs. I'm not sure why I needed to pass the paths both as environment variables and as CMake variables, but some library wasn't found if I did't.
Building
Since we're assuming the use of the cmake Unix Makefiles generator, just type make along with any parameters you wish to add (i.e. -j2 to compile with two parallel jobs).
Fixes Needed
Everything in subversion currently compiles ok. (17/April/2006)

