Defaulted to qt6, fix some deprecations

This commit is contained in:
Blue 2025-02-20 21:37:38 +02:00
parent a8060b393c
commit 066ab487fc
Signed by: blue
GPG key ID: 9B203B252A63EE38
7 changed files with 76 additions and 74 deletions

View file

@ -36,15 +36,18 @@ option(WITH_KCONFIG "Build KConfig support module" ON)
option(WITH_OMEMO "Build OMEMO support module" OFF) #it should be off by default untill I sort the problems out
# Dependencies
## Qt
if (NOT DEFINED QT_VERSION_MAJOR)
find_package(QT NAMES Qt6 Qt5 CONFIG REQUIRED COMPONENTS Widgets DBus Gui Xml Network Core)
else ()
find_package(Qt${QT_VERSION_MAJOR} CONFIG REQUIRED COMPONENTS Widgets DBus Gui Xml Network Core)
## Qt, detect and prefer Qt6 if available
find_package(Qt6 QUIET CONFIG COMPONENTS Widgets DBus Gui Xml Network Core)
if (Qt6_FOUND)
set(QT_VERSION_MAJOR 6)
else()
find_package(Qt5 REQUIRED CONFIG COMPONENTS Widgets DBus Gui Xml Network Core)
set(QT_VERSION_MAJOR 5)
endif()
find_package(Boost COMPONENTS)
message(STATUS "Building against Qt${QT_VERSION_MAJOR}")
find_package(Boost COMPONENTS)
target_include_directories(squawk PRIVATE ${Boost_INCLUDE_DIRS})
## OMEMO