Commit 01e26550 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt build system for building against qt6

parent f5b99462
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
project(filesharing)
set(QT_MIN_VERSION "5.14.0")
set(KF5_MIN_VERSION "5.81.0")
set(QT_MIN_VERSION "5.15.0")
set(KF5_MIN_VERSION "5.90.0")
find_package(ECM ${KF5_MIN_VERSION} CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})
......@@ -12,7 +12,7 @@ include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Core
Widgets
Qml
......@@ -29,8 +29,8 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Declarative
)
find_package(PackageKitQt5)
set_package_properties(PackageKitQt5
find_package(PackageKitQt${QT_MAJOR_VERSION})
set_package_properties(PackageKitQt${QT_MAJOR_VERSION}
PROPERTIES DESCRIPTION "Software Manager integration"
TYPE OPTIONAL
PURPOSE "Needed to automatically install the samba package."
......
......@@ -22,17 +22,17 @@ target_link_libraries(sambausershareplugin
KF5::I18n
KF5::KIOCore
KF5::KIOWidgets
Qt5::Qml
Qt5::QuickWidgets
Qt::Qml
Qt::QuickWidgets
KF5::Auth
KF5::Declarative
)
if(SAMBA_INSTALL)
target_link_libraries(sambausershareplugin PK::packagekitqt5)
target_link_libraries(sambausershareplugin PK::packagekitqt${QT_MAJOR_VERSION})
endif()
install(TARGETS sambausershareplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/propertiesdialog)
install(TARGETS sambausershareplugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf${QT_MAJOR_VERSION}/propertiesdialog)
# kauth
......
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