summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/TDEMacros.cmake2
-rw-r--r--modules/tde_uic.cmake6
2 files changed, 7 insertions, 1 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index fec3163..8b9f93d 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -303,11 +303,11 @@ macro( tde_add_ui_files _sources )
-DUIC_EXECUTABLE:FILEPATH=${UIC_EXECUTABLE}
-DTQT_REPLACE_SCRIPT:FILEPATH=${TQT_REPLACE_SCRIPT}
-DTDE_QTPLUGINS_DIR:FILEPATH=${TDE_QTPLUGINS_DIR}
+ -DMOC_EXECUTABLE:FILEPATH=${MOC_EXECUTABLE}
-DUI_FILE:FILEPATH=${_ui_absolute_path}
-DMASTER_SOURCE_DIR:FILEPATH=${CMAKE_SOURCE_DIR}
-DMASTER_BINARY_DIR:FILEPATH=${CMAKE_BINARY_DIR}
-P ${CMAKE_MODULE_PATH}/tde_uic.cmake
- COMMAND ${MOC_EXECUTABLE} ${_ui_basename}.h >> ${_ui_basename}.cpp
DEPENDS ${_ui_absolute_path} )
endforeach( _ui_file )
diff --git a/modules/tde_uic.cmake b/modules/tde_uic.cmake
index 9567afa..7114d20 100644
--- a/modules/tde_uic.cmake
+++ b/modules/tde_uic.cmake
@@ -58,4 +58,10 @@ if( _ui_cpp_content )
string( REGEX REPLACE ": TQWizard\\(" ": KWizard(" _ui_cpp_content "${_ui_cpp_content}" )
string( REGEX REPLACE ": QWizard\\(" ": KWizard(" _ui_cpp_content "${_ui_cpp_content}" )
file( WRITE ${_ui_basename}.cpp "#include <kdialog.h>\n#include <tdelocale.h>\n\n${_ui_cpp_content}" )
+
+ tde_execute_process( COMMAND ${MOC_EXECUTABLE}
+ ${_ui_basename}.h
+ OUTPUT_VARIABLE _ui_h_moc_content )
+ file( APPEND ${_ui_basename}.cpp "${_ui_h_moc_content}" )
+
endif( )