compiling kdevelop using cmake

Alexander Neundorf neundorf at
Tue May 17 21:50:06 UTC 2005


I think right now the complete (almost) kdevelop compiles and links using 
cmake (cvs).

It does:
-uses only cmake, no autoconf, no automake, no autoheader, no libtool, no m4, 
no perl, no python, no shell, etc.
-build and install the shared libs
-build and install the plugins and creates the .la files (e.g. 
#the source files for this part
abbrevpart.cpp abbrevconfigwidget.cpp addtemplatedlg.cpp )

#the ui files for this part
SET( kdevabbrev_UI
abbrevconfigwidgetbase.ui addtemplatedlgbase.ui )

#automatically generated the rules for the moc files for the sources

#add the ui files to the project
KDE_ADD_UI_FILES(kdevabbrev_PART_SRCS ${kdevabbrev_UI} )

#create a shared library/module/plugin
ADD_LIBRARY(kdevabbrev MODULE ${kdevabbrev_PART_SRCS})

#link it to some kde libs

#create the libtool la file for this plugin

#install rules, relative to CMAKE_INSTALL_PREFIX
INSTALL_TARGETS(/lib/kde3 kdevabbrev)
INSTALL_FILES(/share/apps/kdevabbrev FILES kdevabbrev.rc)
INSTALL_FILES(/share/services FILES kdevabbrev.desktop)
INSTALL_FILES(/share/apps/kdevabbrev/sources FILES qt_classes cpp_keywords)


-build and install the binaries
-you can select the supported languages using ccmake, implemented using the 
OPTION() command (kdevelop/languages/CMakeLists.txt)
-it does some "configure" checks for libz, libpng and dlfcn.h 

Remaining issues:

-libtool convenience libs: currently done via a (slightly hackish) 
KDE_TARGET_LINK_CONV_LIBS() macro. Maybe these could get rid of completely 
and simply compiling the files directly where they are needed instead of 
creating a static lib ?

-still quite some manual work for the rest of the configure checks is needed 
and even more install rules (icons etc.)

-if required several cmake commands could be compiled into KDE specific 
macros, so that less commands would be required per CMakeLists.txt (not sure 
this would be an improvement, I usually prefer the "less magic, more obvious" 

-untested on on *BSD, Mac OS X, cygwin, Windows

-the kdevelop-specific problem of two targets with the same name: 
(lib)kdevelop(.so) and kdevelop

What do you think ?

Work: alexander.neundorf at -
Home: neundorf at                -
      alex at               -

More information about the KDevelop-devel mailing list