From f298c0185ec0e7186991128b99c7fa4790aca6a7 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 20 Apr 2024 17:36:31 -0700 Subject: [PATCH] Qt: Add option to force a specific version of Qt --- src/platform/qt/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/platform/qt/CMakeLists.txt b/src/platform/qt/CMakeLists.txt index 673170f0f..041ad0830 100644 --- a/src/platform/qt/CMakeLists.txt +++ b/src/platform/qt/CMakeLists.txt @@ -25,7 +25,13 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) set(QT_LIBRARIES) -set(QT_VERSIONS 6 5) +option(FORCE_QT_VERSION "Force the used Qt version" OFF) + +if(FORCE_QT_VERSION EQUAL 5 OR FORCE_QT_VERSION EQUAL 6) + set(QT_VERSIONS ${FORCE_QT_VERSION}) +else() + set(QT_VERSIONS 6 5) +endif() foreach(V ${QT_VERSIONS}) set(QT Qt${V}) set(QT_V ${V})