aboutsummaryrefslogtreecommitdiff
path: root/modules/ECMPoQmTools.cmake
diff options
context:
space:
mode:
authorVolker Krause <vkrause@kde.org>2021-11-30 17:01:46 +0100
committerChristophe Giboudeaux <christophe@krop.fr>2021-12-01 07:53:28 +0000
commit2f2062114c4312f669bd5d101bbd1ec083e4f5a7 (patch)
tree4b0576fbea092fea2fdf75289435dc6c7f3b120e /modules/ECMPoQmTools.cmake
parent53a640542786bd80a54c29062a0047c82d2f1dc3 (diff)
downloadextra-cmake-modules-2f2062114c4312f669bd5d101bbd1ec083e4f5a7.tar.gz
extra-cmake-modules-2f2062114c4312f669bd5d101bbd1ec083e4f5a7.tar.bz2
Include QtVersionOption before all Qt5 find_package calls
This doesn't make all these modules actually work with Qt6 yet, but it prevents them from unconditionally pulling in Qt5 in a Qt6 build. This is useful in order to even be able to pass a CMake run to the point one can port, test and debug the rest.
Diffstat (limited to 'modules/ECMPoQmTools.cmake')
-rw-r--r--modules/ECMPoQmTools.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/ECMPoQmTools.cmake b/modules/ECMPoQmTools.cmake
index 86480b71..bf9efe0e 100644
--- a/modules/ECMPoQmTools.cmake
+++ b/modules/ECMPoQmTools.cmake
@@ -83,6 +83,8 @@ Since pre-1.0.0.
#]=======================================================================]
include(CMakeParseArguments)
+include(${CMAKE_CURRENT_LIST_DIR}/QtVersionOption.cmake)
+
# Copied from FindGettext.cmake
function(_ecm_qm_get_unique_target_name _name _unique_name)
@@ -143,7 +145,7 @@ function(ecm_process_po_files_as_qm lang)
endif()
# Find lrelease and lconvert
- find_package(Qt5LinguistTools CONFIG REQUIRED)
+ find_package(Qt${QT_MAJOR_VERSION}LinguistTools CONFIG REQUIRED)
if(TARGET Qt5::lconvert)
set(lconvert_executable Qt5::lconvert)