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

@ -19,7 +19,11 @@ set(SUBSURFACE_PREFERENCES_UI
preferences_units.ui
)
qt5_wrap_ui(SUBSURFACE_PREFERENCES_UI_HDRS ${SUBSURFACE_PREFERENCES_UI})
if(NOT USINGQT6)
qt5_wrap_ui(SUBSURFACE_PREFERENCES_UI_HDRS ${SUBSURFACE_PREFERENCES_UI})
else()
qt_wrap_ui(SUBSURFACE_PREFERENCES_UI_HDRS ${SUBSURFACE_PREFERENCES_UI})
endif()
source_group("Subsurface Interface Files" FILES ${SUBSURFACE_PREFERENCES_UI})