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

Adapt build system for building against qt6

parent 2e18db6b
Pipeline #121407 passed with stage
in 2 minutes and 35 seconds
......@@ -50,7 +50,7 @@ set(KDEPIM_LIB_VERSION "${PIM_VERSION}")
set(KDEPIM_LIB_SOVERSION "5")
set(QT_REQUIRED_VERSION "5.15.2")
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Gui)
find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Gui)
set(MAILIMPORTER_VERSION "5.19.40")
set(MAILCOMMON_LIB_VERSION "5.19.40")
set(MESSAGELIB_LIB_VERSION "5.19.40")
......@@ -77,8 +77,8 @@ find_package(KF5MessageViewer ${MESSAGELIB_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5PimCommonAkonadi ${PIMCOMMON_LIB_VERSION} CONFIG REQUIRED)
include_directories(${importwizard_SOURCE_DIR} ${importwizard_BINARY_DIR})
find_package(Qt5Keychain CONFIG)
set_package_properties(Qt5Keychain PROPERTIES
find_package(Qt${QT_MAJOR_VERSION}Keychain CONFIG)
set_package_properties(Qt${QT_MAJOR_VERSION}Keychain PROPERTIES
DESCRIPTION "Provides support for secure credentials storage"
URL "https://github.com/frankosterfeld/qtkeychain"
TYPE REQUIRED)
......
......@@ -83,7 +83,7 @@ target_link_libraries(akonadiimportwizard
KF5::CoreAddons
KF5::Crash
KF5::DBusAddons
Qt::Widgets
Qt${QT_MAJOR_VERSION}::Widgets
KF5::ConfigCore
KF5::WidgetsAddons
)
......
......@@ -67,7 +67,7 @@ endif()
add_library(KPim::ImportWizard ALIAS KPimImportWizard)
target_include_directories(KPimImportWizard INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/KPim/ImportWizard;${KDE_INSTALL_INCLUDEDIR_KF5}/KPim/>")
target_include_directories(KPimImportWizard INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KPim/ImportWizard;${KDE_INSTALL_INCLUDEDIR_KF}/KPim/>")
generate_export_header(KPimImportWizard BASE_NAME libimportwizard)
......@@ -81,9 +81,12 @@ target_link_libraries(KPimImportWizard
KF5::MailCommon
KF5::MailImporter
KF5::I18n
qt5keychain
)
if (QT_MAJOR_VERSION STREQUAL "6")
target_link_libraries(KPimImportWizard PRIVATE qt6keychain)
else()
target_link_libraries(KPimImportWizard PRIVATE qt5keychain)
endif()
set_target_properties(KPimImportWizard PROPERTIES
VERSION ${IMPORTWIZARD_VERSION}
SOVERSION ${IMPORTWIZARD_SOVERSION}
......@@ -113,14 +116,14 @@ ecm_generate_headers(ImportWizard_CamelCase_HEADERS
install(FILES
${ImportWizard_CamelCase_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KPim/ImportWizard/
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KPim/ImportWizard/
COMPONENT Devel
)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/libimportwizard_export.h
${ImportWizard_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KPim/importwizard/
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KPim/importwizard/
COMPONENT Devel
)
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