diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-10-08 13:01:54 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-10-09 23:52:37 +0900 |
commit | 52da250770e288fc1f51669a886cf206589daefc (patch) | |
tree | 077672d52ff8ce75e19ab9a6e09e6cf0b410e294 | |
parent | 38529b8692626697965166c34f502c4e3fe19098 (diff) | |
download | tde-cmake-52da250770e288fc1f51669a886cf206589daefc.tar.gz tde-cmake-52da250770e288fc1f51669a886cf206589daefc.zip |
Use tqmoc directly instead of tmoc
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r-- | modules/FindTQt.cmake | 34 | ||||
-rw-r--r-- | modules/TDEMacros.cmake | 8 | ||||
-rw-r--r-- | modules/tde_automoc.cmake | 2 | ||||
-rw-r--r-- | modules/tde_uic.cmake | 2 |
4 files changed, 12 insertions, 34 deletions
diff --git a/modules/FindTQt.cmake b/modules/FindTQt.cmake index 82c2918..1c640fc 100644 --- a/modules/FindTQt.cmake +++ b/modules/FindTQt.cmake @@ -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( diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake index ded84a8..71b73e9 100644 --- a/modules/TDEMacros.cmake +++ b/modules/TDEMacros.cmake @@ -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} diff --git a/modules/tde_automoc.cmake b/modules/tde_automoc.cmake index 7a7c23a..0c91ca6 100644 --- a/modules/tde_automoc.cmake +++ b/modules/tde_automoc.cmake @@ -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 ) diff --git a/modules/tde_uic.cmake b/modules/tde_uic.cmake index 7b4f50e..4a38eaa 100644 --- a/modules/tde_uic.cmake +++ b/modules/tde_uic.cmake @@ -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}" ) |