diff options
author | Alexander Neundorf <neundorf@kde.org> | 2006-02-13 18:52:32 +0000 |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2006-02-13 18:52:32 +0000 |
commit | be111f8b6effb76236abb445cf9b5eff3033b85c (patch) | |
tree | f4e428066f1541820a87ae0a80cc46ad179b0c92 | |
parent | 00f37818f01673a028496d3c41f40f0c5e6ee654 (diff) | |
download | extra-cmake-modules-be111f8b6effb76236abb445cf9b5eff3033b85c.tar.gz extra-cmake-modules-be111f8b6effb76236abb445cf9b5eff3033b85c.tar.bz2 |
-added project(name-of_project) commands, so now when using the KDevelop3 generator you will have ready-to-use kdevelop projects :-)
...may have problems with out-of-source builds (requires changes in kdevelop)
Alex
svn path=/trunk/KDE/kdelibs/; revision=509123
-rw-r--r-- | modules/KDE4Macros.cmake | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index cd8af459..ab7de2f4 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -111,15 +111,20 @@ MACRO(KDE4_ADD_KCFG_FILES _sources) SET(_header_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) SET(_moc_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) + # the command for creating the source file from the kcfg file ADD_CUSTOM_COMMAND(OUTPUT ${_src_FILE} COMMAND ${KDE4_KCFGC_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${_kcfg_FILE} ${_tmp_FILE} DEPENDS ${_tmp_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/${_kcfg_FILE} ${_KDE4_KCONFIG_COMPILER_DEP} ) - + # for the case that the header contains signals or slots, it has to be processed by moc + # since the generated header isn't listed as OUTPUT in the ADD_CUSTOM_COMMAND above, we + # have to tell cmake explicitly that it is generated, otherwise it will complain that it doesn't + # exist at cmake time + # the generated source will then include the moc file, but since the source doesn't exist + # yet at cmake time, this can't be recognized by KDE4_AUTOMOC, so we have to set the depedency explicitely SET_SOURCE_FILES_PROPERTIES(${_header_FILE} PROPERTIES GENERATED TRUE) QT4_GENERATE_MOC(${_header_FILE} ${_moc_FILE} ) - MACRO_ADD_FILE_DEPENDENCIES(${_src_FILE} ${_moc_FILE} ) SET(${_sources} ${${_sources}} ${_src_FILE}) |