aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <[email protected]>2025-04-02 14:52:29 +0200
committerJoerg Bornemann <[email protected]>2025-04-07 10:24:22 +0000
commit9e2f47e2f7b1669e92c7956016ba205dbe855012 (patch)
treeeb46cfc1263dc84812fd4b5ff2e4a257ed7589d3
parent21661db604437e9188f09d419c4d14a1ad5b14bd (diff)
Build: Use the Qt::lconvert target
...instead of trying to calculate lconvert's location from lupdate's directory. Change-Id: I3231228310cc63f7969d85b4538e13d240214948 Reviewed-by: Oswald Buddenhagen <[email protected]> Reviewed-by: Eike Ziller <[email protected]>
-rw-r--r--cmake/QtCreatorTranslations.cmake7
1 files changed, 2 insertions, 5 deletions
diff --git a/cmake/QtCreatorTranslations.cmake b/cmake/QtCreatorTranslations.cmake
index 61820a35683..270040450c2 100644
--- a/cmake/QtCreatorTranslations.cmake
+++ b/cmake/QtCreatorTranslations.cmake
@@ -120,13 +120,10 @@ function(_create_ts_custom_target name)
# Uses lupdate + convert instead of just lupdate with '-locations none -no-obsolete'
# to keep the same sorting as the non-'cleaned' target and therefore keep the diff small
- # get path for lconvert...
- get_target_property(_lupdate_binary Qt::lupdate IMPORTED_LOCATION)
- get_filename_component(_bin_dir ${_lupdate_binary} DIRECTORY)
add_custom_target("${_arg_TS_TARGET_PREFIX}${name}_cleaned"
COMMAND Qt::lupdate -locations relative -no-ui-lines "@${response_file}" -ts ${ts_file}
- COMMAND ${_bin_dir}/lconvert -locations none -no-ui-lines -no-obsolete ${ts_file} -o ${ts_file}
+ COMMAND Qt::lconvert -locations none -no-ui-lines -no-obsolete ${ts_file} -o ${ts_file}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMENT "Generate .ts file (${name}), remove obsolete and vanished translations, and do not add files and line number"
DEPENDS ${_arg_DEPENDS}
@@ -149,7 +146,7 @@ function(_create_ts_custom_target name)
endfunction()
function(add_translation_targets file_prefix)
- if (NOT TARGET Qt::lrelease OR NOT TARGET Qt::lupdate)
+ if(NOT TARGET Qt::lrelease OR NOT TARGET Qt::lupdate OR NOT TARGET Qt::lconvert)
# No Qt translation tools were found: Skip this directory
message(WARNING "No Qt translation tools found, skipping translation targets. Add find_package(Qt6 COMPONENTS LinguistTools) to CMake to enable.")
return()