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

Adapt build system for building against qt6

parent c09175e3
Pipeline #121286 passed with stage
in 52 seconds
......@@ -109,7 +109,7 @@ install(EXPORT KF5AkonadiMimeTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FI
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/akonadi-mime_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF} COMPONENT Devel
)
ecm_qt_install_logging_categories(
......
......@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-3-Clause
include(ECMAddTests)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Test Widgets)
find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Test Widgets)
add_subdirectory(messagetests)
......@@ -30,25 +30,25 @@ add_definitions( -DREQUESTER_EXE="${requester_exe_string}" )
add_subdirectory(benchmarker)
ecm_add_test(mailserializerplugintest.cpp ${CMAKE_BINARY_DIR}/serializers/akonadi_serializer_mail_debug.cpp
LINK_LIBRARIES KF5::AkonadiMime KF5::AkonadiCore KF5::AkonadiPrivate KF5::Mime Qt::Test
LINK_LIBRARIES KF5::AkonadiMime KF5::AkonadiCore KF5::AkonadiPrivate KF5::Mime Qt${QT_MAJOR_VERSION}::Test
TEST_NAME mailserializerplugintest
)
ecm_add_test(mailserializertest.cpp
${CMAKE_SOURCE_DIR}/serializers/akonadi_serializer_mail.cpp
${CMAKE_BINARY_DIR}/serializers/akonadi_serializer_mail_debug.cpp
LINK_LIBRARIES KF5::AkonadiMime KF5::AkonadiCore KF5::AkonadiPrivate KF5::Mime Qt::Test
LINK_LIBRARIES KF5::AkonadiMime KF5::AkonadiCore KF5::AkonadiPrivate KF5::Mime Qt${QT_MAJOR_VERSION}::Test
TEST_NAME mailserializertest
)
ecm_add_test(newmailnotifierattributetest.cpp newmailnotifierattributetest.h
LINK_LIBRARIES KF5::AkonadiMime KF5::AkonadiCore Qt::Test
LINK_LIBRARIES KF5::AkonadiMime KF5::AkonadiCore Qt${QT_MAJOR_VERSION}::Test
TEST_NAME newmailnotifierattributetest
)
ecm_add_test(pop3resourceattributetest.cpp pop3resourceattributetest.h
LINK_LIBRARIES KF5::AkonadiMime KF5::AkonadiCore Qt::Test
LINK_LIBRARIES KF5::AkonadiMime KF5::AkonadiCore Qt${QT_MAJOR_VERSION}::Test
TEST_NAME pop3resourceattributetest
)
ecm_add_test(addressattributetest.cpp addressattributetest.h
LINK_LIBRARIES KF5::AkonadiMime KF5::AkonadiCore Qt::Test
LINK_LIBRARIES KF5::AkonadiMime KF5::AkonadiCore Qt${QT_MAJOR_VERSION}::Test
TEST_NAME addressattributetest
)
......@@ -24,11 +24,11 @@ add_executable(akonadi_benchmarker ${benchmarker_SRCS})
target_link_libraries(akonadi_benchmarker
KF5::AkonadiMime
KF5::Mime
Qt::Test
Qt${QT_MAJOR_VERSION}::Test
KF5::AkonadiCore
KF5::I18n
Qt::Widgets
Qt::DBus
Qt${QT_MAJOR_VERSION}::Widgets
Qt${QT_MAJOR_VERSION}::DBus
)
install(TARGETS akonadi_benchmarker ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
......@@ -8,7 +8,7 @@ macro(ADD_AKONADIMIME_TEST)
add_test(NAME akonadimime-${_testName} COMMAND ${_testName})
target_link_libraries(${_testName}
KF5::Mime
Qt::Test
Qt${QT_MAJOR_VERSION}::Test
KF5::AkonadiCore
KF5::AkonadiMime
)
......
......@@ -98,9 +98,9 @@ generate_export_header(KF5AkonadiMime BASE_NAME akonadi-mime)
add_library(KF5::AkonadiMime ALIAS KF5AkonadiMime)
# NOTE: The include directories remain 'akonadi/kmime' to be as SC as possible.
target_include_directories(KF5AkonadiMime INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/Akonadi/KMime>")
target_include_directories(KF5AkonadiMime INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/Akonadi/KMime>")
target_include_directories(KF5AkonadiMime PUBLIC "$<BUILD_INTERFACE:${Akonadi-Mime_SOURCE_DIR}/src;${Akonadi-Mime_BINARY_DIR}/src>")
target_include_directories(KF5AkonadiMime INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/akonadi/kmime>")
target_include_directories(KF5AkonadiMime INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/akonadi/kmime>")
target_link_libraries(KF5AkonadiMime
PUBLIC
......@@ -150,20 +150,20 @@ ecm_generate_headers(AkonadiMime_CamelCase_HEADERS
install(FILES
${AkonadiMime_CamelCase_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/Akonadi/KMime
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/Akonadi/KMime
COMPONENT Devel
)
install(FILES
${AkonadiMime_HEADERS}
${CMAKE_CURRENT_BINARY_DIR}/akonadi-mime_export.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/akonadi/kmime
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/akonadi/kmime
COMPONENT Devel
)
ecm_generate_pri_file(BASE_NAME AkonadiMime
LIB_NAME KF5AkonadiMime
DEPS "AkonadiCore" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/Akonadi/KMime
DEPS "AkonadiCore" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF}/Akonadi/KMime
)
install(FILES
......
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: BSD-3-Clause
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Test Widgets)
find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Test Widgets)
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
add_executable( requester foldersrequester.cpp foldersrequester.h )
target_link_libraries( requester KF5::AkonadiMime KF5::I18n Qt::Widgets )
target_link_libraries( requester KF5::AkonadiMime KF5::I18n Qt${QT_MAJOR_VERSION}::Widgets )
# convenience macro to add akonadi demo application
macro(add_akonadimime_demo _source)
set(_test ${_source})
get_filename_component(_name ${_source} NAME_WE)
add_executable(${_name} ${_test})
target_link_libraries(${_name} KF5AkonadiMime KF5::Mime KF5::AkonadiCore KF5::I18n Qt::Widgets)
target_link_libraries(${_name} KF5AkonadiMime KF5::Mime KF5::AkonadiCore KF5::I18n Qt${QT_MAJOR_VERSION}::Widgets)
endmacro()
# demo applications
......
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