mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
42eb39fc4a
commit
383f326136
1 changed files with 7 additions and 0 deletions
|
@ -299,6 +299,13 @@ elseif (SUBSURFACE_TARGET_EXECUTABLE MATCHES "DownloaderExecutable")
|
||||||
find_package(Qt5 5.11 REQUIRED COMPONENTS ${QT_FIND_COMPONENTS})
|
find_package(Qt5 5.11 REQUIRED COMPONENTS ${QT_FIND_COMPONENTS})
|
||||||
set(MAKE_TESTS OFF)
|
set(MAKE_TESTS OFF)
|
||||||
endif()
|
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})
|
foreach(_QT_COMPONENT ${QT_FIND_COMPONENTS})
|
||||||
list(APPEND QT_LIBRARIES Qt5::${_QT_COMPONENT})
|
list(APPEND QT_LIBRARIES Qt5::${_QT_COMPONENT})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
Loading…
Reference in a new issue