From kde-core-devel Tue Jun 14 20:49:44 2005 From: Alexander Neundorf Date: Tue, 14 Jun 2005 20:49:44 +0000 To: kde-core-devel Subject: Re: Build system for KDE4 Message-Id: <200506142249.45008.neundorf () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=111878220802944 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 Makefile.am'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 MACRO(KDE_ADD_KPART _target_NAME ) ... #if the option was enabled (e.g. in the cmake gui) IF (KDE_ENABLE_FINAL) #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 ELSE (KDE_ENABLE_FINAL) ADD_LIBRARY(${_target_NAME} MODULE ${_magic_SRCS} ) ENDIF (KDE_ENABLE_FINAL) ... ENDMACRO(KDE_ADD_KPART _target_NAME) Bye Alex -- Work: alexander.neundorf@jenoptik.com - http://www.jenoptik-los.de Home: neundorf@kde.org - http://www.kde.org alex@neundorf.net - http://www.neundorf.net