diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2021-07-28 07:44:56 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-07-28 07:44:58 -0700 |
commit | 383f326136635063c80a31772675371fc58861da (patch) | |
tree | 714df264d84de9a0d16969bd3ed2f039f67606d1 | |
parent | 42eb39fc4aa1eb8633489f86719a95ae2feb08a3 (diff) | |
download | subsurface-383f326136635063c80a31772675371fc58861da.tar.gz |
build-system: fail with Qt6
I thought that explicitly requesting Qt5 should be enough, but we have a report
from a user who tried to build against Qt6 and cmake happily let them proceed.
So let's fail this explicitly.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5850462f7..bac09ae8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -299,6 +299,13 @@ elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DownloaderExecutable") find_package(Qt5 5.11 REQUIRED COMPONENTS ${QT_FIND_COMPONENTS}) set(MAKE_TESTS OFF) endif() +# we don't support Qt6 +# the comparison with an invalid version of 5.15 ensures that this will keep working even if +# there are newer Qt 5.15 versions over time (which is unfortunately doubtful) +if (Qt5Core_VERSION VERSION_GREATER 5.15.15) + message(FATAL_ERROR "Subsurface cannot be built against Qt 6 or later") +endif() + foreach(_QT_COMPONENT ${QT_FIND_COMPONENTS}) list(APPEND QT_LIBRARIES Qt5::${_QT_COMPONENT}) endforeach() |