Commit 25116f29 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt build system for building against qt6

parent 3ff1e7da
Pipeline #120967 passed with stage
in 1 minute and 53 seconds
......@@ -44,7 +44,11 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX KIDENTITYMANAGEMENT
########### Find packages ###########
find_package(Qt5Network NO_MODULE REQUIRED)
find_package(Qt${QT_MAJOR_VERSION}Network NO_MODULE REQUIRED)
if (QT_MAJOR_VERSION STREQUAL "6")
find_package(Qt6Core5Compat)
endif()
find_package(KF5CoreAddons ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5TextWidgets ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5XmlGui ${KF5_MIN_VERSION} CONFIG REQUIRED)
......@@ -96,7 +100,7 @@ install(EXPORT KF5IdentityManagementTargets
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/kidentitymanagement_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}
COMPONENT Devel
)
......
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: BSD-3-Clause
include(ECMAddTests)
find_package(Qt5Test ${QT_REQUIRED_VERSION} CONFIG REQUIRED)
find_package(Qt${QT_MAJOR_VERSION}Test ${QT_REQUIRED_VERSION} CONFIG REQUIRED)
ecm_add_tests( identitytest.cpp signaturetest.cpp NAME_PREFIX "kpimidentity-" LINK_LIBRARIES KF5IdentityManagement
KF5::PimTextEdit Qt::Test KF5::ConfigCore KF5::TextWidgets KF5::XmlGui KF5::CoreAddons)
KF5::PimTextEdit Qt${QT_MAJOR_VERSION}::Test KF5::ConfigCore KF5::TextWidgets KF5::XmlGui KF5::CoreAddons)
target_compile_definitions(signaturetest PRIVATE
SIGNATURETEST_DATA_FILE="${CMAKE_CURRENT_SOURCE_DIR}/signaturetest.cpp"
......
......@@ -35,7 +35,7 @@ generate_export_header(KF5IdentityManagement BASE_NAME kidentitymanagement)
target_include_directories(KF5IdentityManagement INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/KIdentityManagement;${KDE_INSTALL_INCLUDEDIR_KF5}/KIdentityManagement/kidentitymanagement;>")
target_include_directories(KF5IdentityManagement INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KIdentityManagement;${KDE_INSTALL_INCLUDEDIR_KF}/KIdentityManagement/kidentitymanagement;>")
target_include_directories(KF5IdentityManagement PUBLIC "$<BUILD_INTERFACE:${KIdentityManagement_SOURCE_DIR}/src;${KIdentityManagement_BINARY_DIR}/src>")
target_link_libraries(KF5IdentityManagement
......@@ -44,7 +44,7 @@ PUBLIC
KF5::PimTextEdit
PRIVATE
KF5::Codecs
Qt::Network
Qt${QT_MAJOR_VERSION}::Network
KF5::I18n
KF5::WidgetsAddons
KF5::XmlGui
......@@ -78,18 +78,18 @@ ecm_generate_headers(KIdentityManagement_CamelCase_HEADERS
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/kidentitymanagement_export.h
${KIdentityManagement_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KIdentityManagement/kidentitymanagement
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KIdentityManagement/kidentitymanagement
COMPONENT Devel
)
install(FILES ${KIdentityManagement_CamelCase_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KIdentityManagement/KIdentityManagement/
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KIdentityManagement/KIdentityManagement/
COMPONENT Devel
)
install(FILES org.kde.pim.IdentityManager.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR} RENAME kf5_org.kde.pim.IdentityManager.xml)
ecm_generate_pri_file(BASE_NAME KIdentityManagement LIB_NAME KF5IdentityManagement DEPS "KCoreAddons KPimTextEdit" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/KIdentityManagement)
ecm_generate_pri_file(BASE_NAME KIdentityManagement LIB_NAME KF5IdentityManagement DEPS "KCoreAddons KPimTextEdit" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF}/KIdentityManagement)
install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
ecm_qt_install_logging_categories(EXPORT KIDENTITYMANAGEMENT FILE kidentitymanagement.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
......
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