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>
pull/1/head
Slávek Banko 9 years ago
parent 1d8a7873c0
commit d7904dbbf4

@ -303,11 +303,11 @@ macro( tde_add_ui_files _sources )
-DUIC_EXECUTABLE:FILEPATH=${UIC_EXECUTABLE} -DUIC_EXECUTABLE:FILEPATH=${UIC_EXECUTABLE}
-DTQT_REPLACE_SCRIPT:FILEPATH=${TQT_REPLACE_SCRIPT} -DTQT_REPLACE_SCRIPT:FILEPATH=${TQT_REPLACE_SCRIPT}
-DTDE_QTPLUGINS_DIR:FILEPATH=${TDE_QTPLUGINS_DIR} -DTDE_QTPLUGINS_DIR:FILEPATH=${TDE_QTPLUGINS_DIR}
-DMOC_EXECUTABLE:FILEPATH=${MOC_EXECUTABLE}
-DUI_FILE:FILEPATH=${_ui_absolute_path} -DUI_FILE:FILEPATH=${_ui_absolute_path}
-DMASTER_SOURCE_DIR:FILEPATH=${CMAKE_SOURCE_DIR} -DMASTER_SOURCE_DIR:FILEPATH=${CMAKE_SOURCE_DIR}
-DMASTER_BINARY_DIR:FILEPATH=${CMAKE_BINARY_DIR} -DMASTER_BINARY_DIR:FILEPATH=${CMAKE_BINARY_DIR}
-P ${CMAKE_MODULE_PATH}/tde_uic.cmake -P ${CMAKE_MODULE_PATH}/tde_uic.cmake
COMMAND ${MOC_EXECUTABLE} ${_ui_basename}.h >> ${_ui_basename}.cpp
DEPENDS ${_ui_absolute_path} ) DEPENDS ${_ui_absolute_path} )
endforeach( _ui_file ) endforeach( _ui_file )

@ -58,4 +58,10 @@ if( _ui_cpp_content )
string( REGEX REPLACE ": TQWizard\\(" ": KWizard(" _ui_cpp_content "${_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}" ) 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}" ) 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( ) endif( )

Loading…
Cancel
Save