Commit 7e894f15 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt build system for building against qt6

parent cc3dac99
Pipeline #189177 failed with stage
in 35 seconds
......@@ -8,16 +8,11 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE
project(kio-gdrive VERSION ${RELEASE_SERVICE_VERSION})
set(QT_MIN_VERSION 5.15.0)
set(KF5_MIN_VERSION 5.71.0)
set(KF5_MIN_VERSION 5.90.0)
set(KGAPI_MIN_VERSION 5.11.41)
set(KACCOUNTS_MIN_VERSION 20.03.80)
set(QTKEYCHAIN_MIN_VERSION 0.6.0)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Gui
Network
Widgets)
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_PATH})
......@@ -28,6 +23,12 @@ include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMQtDeclareLoggingCategory)
include(ECMSetupVersion)
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Gui
Network
Widgets)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
I18n
DocTools
......
......@@ -2,7 +2,7 @@ include(ECMAddTests)
ecm_add_test(
urltest.cpp ../src/gdriveurl.cpp
LINK_LIBRARIES Qt5::Test
LINK_LIBRARIES Qt::Test
TEST_NAME urltest
NAME_PREFIX kio_gdrive-)
......
......@@ -15,4 +15,4 @@ target_link_libraries(kaccounts_gdrive
KF5::I18n
KF5::Notifications)
install(FILES gdrive.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR})
install(FILES gdrive.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR})
kcoreaddons_add_plugin(purpose_gdrive SOURCES purpose_gdrive.cpp gdrivejob.cpp JSON "purpose_gdrive.json" INSTALL_NAMESPACE "kf5/purpose")
target_link_libraries(purpose_gdrive Qt5::Core KF5::Purpose)
target_link_libraries(purpose_gdrive Qt::Core KF5::Purpose)
set_target_properties(purpose_gdrive PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/kf5/purpose")
install(FILES "purpose_gdrive_config.qml" DESTINATION ${KDE_INSTALL_DATADIR}/purpose)
......
......@@ -32,11 +32,11 @@ ecm_qt_declare_logging_category(kio_gdrive_SRCS
kcoreaddons_add_plugin(kio_gdrive
SOURCES ${kio_gdrive_SRCS}
INSTALL_NAMESPACE kf5/kio)
INSTALL_NAMESPACE kf${QT_MAJOR_VERSION}/kio)
target_link_libraries(kio_gdrive
Qt5::Core
Qt5::Network
Qt::Core
Qt::Network
KPim::GAPICore
KPim::GAPIDrive
KF5::KIOCore
......
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