diff options
author | Eike Ziller <eike.ziller@qt.io> | 2021-07-09 14:50:41 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2021-07-14 10:15:54 +0000 |
commit | 40e87880fd81ce91dfdde0e5169eeb3795eea619 (patch) | |
tree | b5b95acd750fde2e7f2efd6f34044c55d0ec9756 /cmake | |
parent | b84c8cf892ed364d344f9142f15221a47938cd2a (diff) |
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>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/FindQt5.cmake | 2 | ||||
-rw-r--r-- | cmake/QtCreatorTranslations.cmake | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cmake/FindQt5.cmake b/cmake/FindQt5.cmake index dbbb07681f..4fde452733 100644 --- a/cmake/FindQt5.cmake +++ b/cmake/FindQt5.cmake @@ -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) diff --git a/cmake/QtCreatorTranslations.cmake b/cmake/QtCreatorTranslations.cmake index a674f37be6..a9da1e5247 100644 --- a/cmake/QtCreatorTranslations.cmake +++ b/cmake/QtCreatorTranslations.cmake @@ -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() |