代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/qt5-qttools 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 57fd5853a7b56818fa137afe931feec18cf0942d Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Wed, 30 Aug 2023 11:09:46 +0800
Subject: [PATCH] update Qt5LinguistToolsMacros.cmake
---
src/linguist/Qt5LinguistToolsMacros.cmake | 46 ++++-------------------
1 file changed, 7 insertions(+), 39 deletions(-)
diff --git a/src/linguist/Qt5LinguistToolsMacros.cmake b/src/linguist/Qt5LinguistToolsMacros.cmake
index 6a45e57..09f5845 100644
--- a/src/linguist/Qt5LinguistToolsMacros.cmake
+++ b/src/linguist/Qt5LinguistToolsMacros.cmake
@@ -42,17 +42,6 @@ function(QT5_CREATE_TRANSLATION _qm_files)
set(_lupdate_files ${_LUPDATE_UNPARSED_ARGUMENTS})
set(_lupdate_options ${_LUPDATE_OPTIONS})
- list(FIND _lupdate_options "-extensions" _extensions_index)
- if(_extensions_index GREATER -1)
- math(EXPR _extensions_index "${_extensions_index} + 1")
- list(GET _lupdate_options ${_extensions_index} _extensions_list)
- string(REPLACE "," ";" _extensions_list "${_extensions_list}")
- list(TRANSFORM _extensions_list STRIP)
- list(TRANSFORM _extensions_list REPLACE "^\\." "")
- list(TRANSFORM _extensions_list PREPEND "*.")
- else()
- set(_extensions_list "*.java;*.jui;*.ui;*.c;*.c++;*.cc;*.cpp;*.cxx;*.ch;*.h;*.h++;*.hh;*.hpp;*.hxx;*.js;*.qs;*.qml;*.qrc")
- endif()
set(_my_sources)
set(_my_tsfiles)
foreach(_file ${_lupdate_files})
@@ -64,27 +53,15 @@ function(QT5_CREATE_TRANSLATION _qm_files)
list(APPEND _my_sources ${_abs_FILE})
endif()
endforeach()
- set(stamp_file_dir "${CMAKE_CURRENT_BINARY_DIR}/.lupdate")
- if(NOT EXISTS "${stamp_file_dir}")
- file(MAKE_DIRECTORY "${stamp_file_dir}")
- endif()
foreach(_ts_file ${_my_tsfiles})
- get_filename_component(_ts_name ${_ts_file} NAME)
if(_my_sources)
# make a list file to call lupdate on, so we don't make our commands too
# long for some systems
+ get_filename_component(_ts_name ${_ts_file} NAME)
set(_ts_lst_file "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lst_file")
set(_lst_file_srcs)
- set(_dependencies)
foreach(_lst_file_src ${_my_sources})
set(_lst_file_srcs "${_lst_file_src}\n${_lst_file_srcs}")
- if(IS_DIRECTORY ${_lst_file_src})
- list(TRANSFORM _extensions_list PREPEND "${_lst_file_src}/" OUTPUT_VARIABLE _directory_glob)
- file(GLOB_RECURSE _directory_contents CONFIGURE_DEPENDS ${_directory_glob})
- list(APPEND _dependencies ${_directory_contents})
- else()
- list(APPEND _dependencies "${_lst_file_src}")
- endif()
endforeach()
get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES)
@@ -95,15 +72,13 @@ function(QT5_CREATE_TRANSLATION _qm_files)
file(WRITE ${_ts_lst_file} "${_lst_file_srcs}")
endif()
- set(stamp_file "${stamp_file_dir}/${_ts_name}.stamp")
- add_custom_command(OUTPUT ${stamp_file}
+ add_custom_command(OUTPUT ${_ts_file}
COMMAND ${Qt5_LUPDATE_EXECUTABLE}
ARGS ${_lupdate_options} "@${_ts_lst_file}" -ts ${_ts_file}
- COMMAND ${CMAKE_COMMAND} -E touch "${stamp_file}"
- DEPENDS ${_dependencies}
- VERBATIM)
+ DEPENDS ${_my_sources}
+ BYPRODUCTS ${_ts_lst_file} VERBATIM)
endforeach()
- qt5_add_translation(${_qm_files} __QT_INTERNAL_DEPEND_ON_TIMESTAMP_FILE ${_my_tsfiles})
+ qt5_add_translation(${_qm_files} ${_my_tsfiles})
set(${_qm_files} ${${_qm_files}} PARENT_SCOPE)
endfunction()
@@ -120,7 +95,7 @@ endif()
function(QT5_ADD_TRANSLATION _qm_files)
- set(options __QT_INTERNAL_DEPEND_ON_TIMESTAMP_FILE)
+ set(options)
set(oneValueArgs)
set(multiValueArgs OPTIONS)
@@ -130,7 +105,6 @@ function(QT5_ADD_TRANSLATION _qm_files)
foreach(_current_FILE ${_lrelease_files})
get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
get_filename_component(qm ${_abs_FILE} NAME)
- set(ts_stamp_file "${CMAKE_CURRENT_BINARY_DIR}/.lupdate/${qm}.stamp")
# everything before the last dot has to be considered the file name (including other dots)
string(REGEX REPLACE "\\.[^.]*$" "" FILE_NAME ${qm})
get_source_file_property(output_location ${_abs_FILE} OUTPUT_LOCATION)
@@ -141,16 +115,10 @@ function(QT5_ADD_TRANSLATION _qm_files)
set(qm "${CMAKE_CURRENT_BINARY_DIR}/${FILE_NAME}.qm")
endif()
- if(_LRELEASE___QT_INTERNAL_DEPEND_ON_TIMESTAMP_FILE)
- set(qm_dep "${ts_stamp_file}")
- else()
- set(qm_dep "${_abs_FILE}")
- endif()
-
add_custom_command(OUTPUT ${qm}
COMMAND ${Qt5_LRELEASE_EXECUTABLE}
ARGS ${_LRELEASE_OPTIONS} ${_abs_FILE} -qm ${qm}
- DEPENDS ${qm_dep} VERBATIM
+ DEPENDS ${_abs_FILE} VERBATIM
)
list(APPEND ${_qm_files} ${qm})
endforeach()
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。