Commit b209e209 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt build system for building against qt6

parent 7779fb5b
Pipeline #116024 passed with stage
in 40 seconds
......@@ -9,7 +9,7 @@ set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_
project(kblackbox VERSION ${RELEASE_SERVICE_VERSION})
set (QT_MIN_VERSION "5.15.0")
set (KF5_MIN_VERSION "5.85.0")
set (KF5_MIN_VERSION "5.90.0")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
......@@ -23,7 +23,12 @@ include(ECMAddAppIcon)
include(ECMSetupVersion)
include(FeatureSummary)
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Svg)
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Svg)
find_package(Qt${QT_MAJOR_VERSION}QuickWidgets ${REQUIRED_QT_VERSION} CONFIG)
if (QT_MAJOR_VERSION STREQUAL "6")
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS SvgWidgets)
endif()
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Archive
CoreAddons
......@@ -41,7 +46,7 @@ find_package(KF5KDEGames 7.3.0 REQUIRED)
add_definitions(
-DQT_DISABLE_DEPRECATED_BEFORE=0x050F00
-DQT_DEPRECATED_WARNINGS_SINCE=0x060000
-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055800
-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055900
-DKF_DEPRECATED_WARNINGS_SINCE=0x060000
)
......
......@@ -70,10 +70,14 @@ target_link_libraries(kblackbox
KF5::TextWidgets
KF5::DBusAddons
KF5::Crash
Qt::Svg
Qt::Xml
Qt${QT_MAJOR_VERSION}::Svg
Qt${QT_MAJOR_VERSION}::Xml
)
if (QT_MAJOR_VERSION STREQUAL "6")
target_link_libraries(kblackbox Qt6::SvgWidgets)
endif()
install(TARGETS kblackbox ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS org.kde.kblackbox.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES org.kde.kblackbox.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment