Use tqmoc directly instead of tmoc

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/115/head
Michele Calgaro 1 month ago
parent 38529b8692
commit 52da250770
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -21,38 +21,16 @@ if( NOT TQT_FOUND )
endif( )
mark_as_advanced(
TMOC_EXECUTABLE
MOC_EXECUTABLE
UIC_EXECUTABLE
)
# tmoc_executable
tde_execute_process(
COMMAND pkg-config tqt --variable=tmoc_executable
OUTPUT_VARIABLE TMOC_EXECUTABLE
CACHE FILEPATH "TQt tmoc executable path"
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( NOT EXISTS ${TMOC_EXECUTABLE} )
tde_message_fatal( "tmoc is not found!\n tqt is correctly installed?" )
endif( )
tqt_message( " tmoc path: ${TMOC_EXECUTABLE}" )
# moc_executable
tde_execute_process(
COMMAND pkg-config tqt --variable=moc_executable
OUTPUT_VARIABLE MOC_EXECUTABLE
CACHE FILEPATH "TQt moc executable path"
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( NOT EXISTS ${MOC_EXECUTABLE} )
tde_message_fatal( "Path to moc is not set.\n tqt is correctly installed?" )
# tqmoc_executable
pkg_get_variable( TQT_PREFIX tqt-mt prefix )
find_program( TQMOC_EXECUTABLE NAMES tqmoc HINTS "${TQT_PREFIX}/bin" )
if( NOT TQMOC_EXECUTABLE )
tde_message_fatal( "tqmoc was NOT found.\n Please make sure TQt is correctly installed." )
endif( )
tqt_message( " moc path: ${MOC_EXECUTABLE}" )
tqt_message( " tqmoc path: ${TQMOC_EXECUTABLE}" )
# uic_executable
tde_execute_process(

@ -489,7 +489,7 @@ macro( tde_add_ui_files _sources )
-DUIC_EXECUTABLE:FILEPATH=${UIC_EXECUTABLE}
-DTQT_REPLACE_SCRIPT:FILEPATH=${TQT_REPLACE_SCRIPT}
-DTDE_TQTPLUGINS_DIR:FILEPATH=${TDE_TQTPLUGINS_DIR}
-DMOC_EXECUTABLE:FILEPATH=${MOC_EXECUTABLE}
-DTQMOC_EXECUTABLE:FILEPATH=${TQMOC_EXECUTABLE}
-DUI_FILE:FILEPATH=${_ui_absolute_path}
-DMASTER_SOURCE_DIR:FILEPATH=${CMAKE_SOURCE_DIR}
-DMASTER_BINARY_DIR:FILEPATH=${CMAKE_BINARY_DIR}
@ -514,7 +514,7 @@ macro( tde_moc _sources )
set( _output_file "${_basename}.moc.cpp" )
add_custom_command( OUTPUT ${_output_file}
COMMAND
${TMOC_EXECUTABLE} ${_input_file} -o ${_output_file}
${TQMOC_EXECUTABLE} ${_input_file} -o ${_output_file}
DEPENDS
${_input_file} )
list( APPEND ${_sources} ${_output_file} )
@ -571,7 +571,7 @@ macro( tde_automoc )
# moc-ing header
file( RELATIVE_PATH _moc_file_relative "${CMAKE_BINARY_DIR}" "${_moc_file}" )
add_custom_command( OUTPUT ${_moc_file}
COMMAND ${TMOC_EXECUTABLE} ${_header_file} -o ${_moc_file}
COMMAND ${TQMOC_EXECUTABLE} ${_header_file} -o ${_moc_file}
COMMENT "Generating ${_moc_file_relative}"
DEPENDS ${_header_file} )
@ -606,7 +606,7 @@ macro( tde_automoc )
add_custom_command( OUTPUT ${_automoc_file}
COMMAND ${CMAKE_COMMAND}
-DTMOC_EXECUTABLE:FILEPATH=${TMOC_EXECUTABLE}
-DTQMOC_EXECUTABLE:FILEPATH=${TQMOC_EXECUTABLE}
-DSRC_FILE:FILEPATH=${CMAKE_CURRENT_BINARY_DIR}/${_basename}
-DMETA_INCLUDES:STRING="${_meta_includes}"
-DMASTER_SOURCE_DIR:FILEPATH=${CMAKE_SOURCE_DIR}

@ -56,7 +56,7 @@ if( EXISTS "${_src_file}" )
endif( )
# moc-ing header
execute_process( COMMAND ${TMOC_EXECUTABLE} ${_header_file} -o ${_moc_file} )
execute_process( COMMAND ${TQMOC_EXECUTABLE} ${_header_file} -o ${_moc_file} )
list( APPEND _moc_headers "${_src_header}.h" )
endforeach( _moc_file )

@ -70,7 +70,7 @@ if( _ui_cpp_content )
endif( TDE_FOUND AND NOT TQT_ONLY )
file( WRITE ${_ui_basename}.cpp "${_ui_cpp_content}" )
tde_execute_process( COMMAND ${MOC_EXECUTABLE}
tde_execute_process( COMMAND ${TQMOC_EXECUTABLE}
${_ui_basename}.h
OUTPUT_VARIABLE _ui_h_moc_content )
file( APPEND ${_ui_basename}.cpp "${_ui_h_moc_content}" )

Loading…
Cancel
Save