From be111f8b6effb76236abb445cf9b5eff3033b85c Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 13 Feb 2006 18:52:32 +0000 Subject: -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 --- modules/KDE4Macros.cmake | 9 +++++++-- 1 file 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}) -- cgit v1.2.1