diff options
-rw-r--r-- | modules/KDE4Macros.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 5b899963..4db3809a 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -109,6 +109,7 @@ macro (KDE4_ADD_KCFG_FILES _sources) string(REGEX REPLACE "^(.*\n)?File=([^\n]+kcfg).*\n.*$" "\\2" _kcfg_FILE "${_contents}") set(_src_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) 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 ${_header_FILE} ${_src_FILE} @@ -117,6 +118,9 @@ macro (KDE4_ADD_KCFG_FILES _sources) MAIN_DEPENDENCY ${_tmp_FILE} DEPENDS ${_abs_PATH}/${_kcfg_FILE} ${_KDE4_KCONFIG_COMPILER_DEP} ) + QT4_GENERATE_MOC(${_header_FILE} ${_moc_FILE} ) + MACRO_ADD_FILE_DEPENDENCIES(${_src_FILE} ${_moc_FILE} ) + set(${_sources} ${${_sources}} ${_src_FILE} ${_header_FILE}) endforeach (_current_FILE) |