build-system: update cmake to allow Qt5 and Qt6

Qt6 builds of course still fail, but now they are at least possible.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2022-02-09 15:02:30 -08:00
parent c4319e3995
commit ce254bee57
6 changed files with 97 additions and 33 deletions

View file

@ -1,5 +1,9 @@
# QTest based tests
qt5_add_resources(SUBSURFACE_TEST_RESOURCES ../subsurface.qrc)
if(NOT USINGQT6)
qt5_add_resources(SUBSURFACE_TEST_RESOURCES ../subsurface.qrc)
else()
qt_add_resources(SUBSURFACE_TEST_RESOURCES ../subsurface.qrc)
endif()
# Access test data (dive folder) from SUBSURFACE_SOURCE by default.
# In cross compilation cases or when test will not be executed at build time