diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-03-17 01:24:36 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-03-17 01:24:36 +0100 |
commit | d7904dbbf42570f26fb21e381e0f9681bd2ed2de (patch) | |
tree | c7969aacb50cada751e80e558762a891632202df /modules | |
parent | 1d8a7873c0e0660c58a2d0d7b054d216d5f06b0a (diff) | |
download | tde-cmake-d7904dbbf42570f26fb21e381e0f9681bd2ed2de.tar.gz tde-cmake-d7904dbbf42570f26fb21e381e0f9681bd2ed2de.zip |
Move last command processing 'ui' file from TDEMacros to tde_uic
Used cmake method of processing output from the command
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/TDEMacros.cmake | 2 | ||||
-rw-r--r-- | modules/tde_uic.cmake | 6 |
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( ) |