We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2cfa890 + ce63bb0 commit 95efa31Copy full SHA for 95efa31
external/svgscene/CMakeLists.txt
@@ -1,8 +1,16 @@
1
cmake_minimum_required(VERSION 3.10)
2
project(svgscene)
3
4
+set(QT_VERSION_MAJOR "auto" CACHE STRING "Qt major version to use. 5|6|auto")
5
+
6
+if (NOT "${QT_VERSION_MAJOR}" MATCHES "5|6|auto")
7
+ message(FATAL_ERROR "Invalid value for QT_VERSION_MAJOR: ${QT_VERSION_MAJOR} (expected 5, 6 or auto)")
8
+endif ()
9
10
+if ("${QT_VERSION_MAJOR}" STREQUAL "auto")
11
+ find_package(QT NAMES Qt5 Qt6 COMPONENTS Core REQUIRED)
12
13
-find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED)
14
# Normally, we would use variable Qt5 or Qt6 to reference the Qt library. Here we do that through
15
# this variable based on detected version major of Qt.
16
set(QtLib "Qt${QT_VERSION_MAJOR}")
0 commit comments