Build system for KDE4

Alexander Neundorf neundorf at
Tue Jun 14 21:49:44 BST 2005

On Tuesday 14 June 2005 20:49, Alexander Neundorf wrote:
> In some way cmake reminds me on Qt: it's written and maintained by a
> company, it's available as open source, it has good documentation, and it's
> implemented in C++.
> Bye
> Alex

What I forgot to mention:
-in kdevelop/cmake you can find am2cmake, a script which converts's to cmake's CMakeLists.txt (the LD_ADD and LIB_ADD vars are 
still ignored, most other things work)

-KDE_ADD_KPART() creates a KDE part with the given name from the listed 
sources, the same can be done for an application, library, etc.

-AFAICT cmake supports java in some way. I never used it, but there are some 
source files which deal with handling java files

-if you want to know more details about linking behaviour of cmake, consider 
subscribing to the cmake mailing list and contacting the developers directly 
(Thiago ?) They are usually very open for suggestion which improve cmake. 

-now KDE_ADD_KPART() also comes with "enable-final", here's the code, as you 
see it's simple:

#define a user-adjustable option, default off
OPTION(KDE_ENABLE_FINAL "Enable final all-in-one compilation")

#just the stuff which implements enable-final
  #if the option was enabled (e.g. in the cmake gui)
    #generate a file including all the source files
    FILE(WRITE ${_target_NAME}_final.cpp "//autogenerated file\n")
    FOREACH (_current_FILE ${_magic_SRCS})
      FILE(APPEND ${_target_NAME}_final.cpp "#include \"${_current_FILE}\"\n")
    ENDFOREACH (_current_FILE)
    #and create the library from this generated file
    ADD_LIBRARY(${_target_NAME} MODULE  ${_target_NAME}_final.cpp)
  #otherwise proceed as normal
    ADD_LIBRARY(${_target_NAME} MODULE ${_magic_SRCS} )

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

More information about the kde-core-devel mailing list