CMake: Make it possible to run ts_* targets with Qt 6

Alias for lupdate for missing

Change-Id: I8a9a68e6d3be54ab8e1d143d3611e9d8da6d760d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Eike Ziller
2021-07-09 14:50:41 +02:00
parent b84c8cf892
commit 40e87880fd
2 changed files with 2 additions and 2 deletions

View File

@@ -78,7 +78,7 @@ endif()
set(Qt5_FOUND ${Qt6_FOUND})
set(Qt5_VERSION ${Qt6_VERSION})
foreach(tool qmake lrelease moc rcc qhelpgenerator)
foreach(tool qmake lrelease lupdate moc rcc qhelpgenerator)
if (TARGET Qt6::${tool} AND NOT TARGET Qt5::${tool})
add_executable(Qt5::${tool} IMPORTED GLOBAL)
get_target_property(imported_location Qt6::${tool} IMPORTED_LOCATION)

View File

@@ -95,7 +95,7 @@ function(_create_ts_custom_target name)
endfunction()
function(add_translation_targets file_prefix)
if (NOT TARGET Qt5::lrelease)
if (NOT TARGET Qt5::lrelease OR NOT TARGET Qt5::lupdate)
# No Qt translation tools were found: Skip this directory
message(WARNING "No Qt translation tools found, skipping translation targets. Add find_package(Qt5 COMPONENTS LinguistTools) to CMake to enable.")
return()