Commit b5c80ae6 authored by Laurent Montel's avatar Laurent Montel
Browse files

Fix some compile error against qt6

parent f6b43f0d
Pipeline #145154 passed with stage
in 51 seconds
......@@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.16)
project (KActivityManagerd)
set (QT_MIN_VERSION "5.15.0")
set (KF5_MIN_VERSION "5.86")
set (KF5_MIN_VERSION "5.90")
set (KDE_COMPILERSETTINGS_LEVEL "5.82")
set (Boost_MINIMUM_VERSION "1.58")
......@@ -48,7 +48,12 @@ set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
# Qt
find_package (Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core DBus Widgets)
find_package (Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core DBus Widgets)
if (QT_MAJOR_VERSION STREQUAL "6")
find_package(Qt6Core5Compat ${REQUIRED_QT_VERSION} REQUIRED) # QTextCodec
endif()
# KDE Frameworks
find_package (KF5DBusAddons ${KF5_MIN_VERSION} CONFIG REQUIRED)
......
......@@ -6,7 +6,7 @@ project (ActivityManager)
find_package (ECM 0.0.8 REQUIRED NO_MODULE)
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
find_package (Qt5 REQUIRED NO_MODULE COMPONENTS Sql Gui Widgets)
find_package (Qt${QT_MAJOR_VERSION} REQUIRED NO_MODULE COMPONENTS Sql Gui Widgets)
find_package (KF5Config ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package (KF5CoreAddons ${KF5_MIN_VERSION} CONFIG REQUIRED)
......@@ -77,7 +77,7 @@ target_link_libraries (kactivitymanagerd
install (FILES
files/kactivitymanagerd.desktop
DESTINATION ${KDE_INSTALL_KSERVICES5DIR}
DESTINATION ${KDE_INSTALL_KSERVICESDIR}
)
install (TARGETS
......@@ -91,6 +91,6 @@ install (TARGETS
install (FILES
files/kactivitymanagerd-plugin.desktop
DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}
DESTINATION ${KDE_INSTALL_KSERVICETYPESDIR}
)
......@@ -48,7 +48,9 @@ target_link_libraries (
KF5::Crash
kactivitymanagerd_plugin
)
if(TARGET Qt6::Core5Compat)
target_link_libraries(kactivitymanagerd_plugin_sqlite Qt6::Core5Compat)
endif()
set_target_properties (
kactivitymanagerd_plugin_sqlite
PROPERTIES PREFIX ""
......
Supports Markdown
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