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

Adapt build system for building against qt6

parent bde99aef
Pipeline #121021 passed with stage
in 34 seconds
......@@ -46,7 +46,7 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX AKONADINOTES
)
########### Find packages ###########
find_package(Qt5Xml ${QT_REQUIRED_VERSION} CONFIG REQUIRED)
find_package(Qt${QT_MAJOR_VERSION}Xml ${QT_REQUIRED_VERSION} CONFIG REQUIRED)
find_package(KF5I18n ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5Mime ${KMIMELIB_VERSION} CONFIG REQUIRED)
......@@ -83,7 +83,7 @@ install(EXPORT KF5AkonadiNotesTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" F
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/akonadi-notes_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF} COMPONENT Devel
)
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
......
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: BSD-3-Clause
include(ECMMarkAsTest)
find_package(Qt5Test ${QT_REQUIRED_VERSION} CONFIG REQUIRED)
find_package(Qt${QT_MAJOR_VERSION}Test ${QT_REQUIRED_VERSION} CONFIG REQUIRED)
add_executable(notestest notestest.cpp)
add_test(NAME notestest COMMAND notestest)
ecm_mark_as_test(notestest)
target_link_libraries(notestest KF5AkonadiNotes KF5::Mime Qt::Test)
target_link_libraries(notestest KF5AkonadiNotes KF5::Mime Qt${QT_MAJOR_VERSION}::Test)
set(CMAKE_PREFIX_PATH ../)
......@@ -15,14 +15,14 @@ generate_export_header(KF5AkonadiNotes BASE_NAME akonadi-notes)
kde_target_enable_exceptions(KF5AkonadiNotes PUBLIC)
target_include_directories(KF5AkonadiNotes INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/Akonadi/Notes;${KDE_INSTALL_INCLUDEDIR_KF5}/akonadi/notes>")
target_include_directories(KF5AkonadiNotes INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/Akonadi/Notes;${KDE_INSTALL_INCLUDEDIR_KF}/akonadi/notes>")
target_include_directories(KF5AkonadiNotes PUBLIC "$<BUILD_INTERFACE:${Akonadi-Notes_SOURCE_DIR}/src;${Akonadi-Notes_BINARY_DIR}/src;>")
target_link_libraries(KF5AkonadiNotes
PUBLIC
KF5::Mime
PRIVATE
Qt::Xml
Qt${QT_MAJOR_VERSION}::Xml
KF5::I18n
)
......@@ -47,7 +47,7 @@ ecm_generate_headers(AkonadiNotes_CamelCase_HEADERS
install(FILES
${AkonadiNotes_CamelCase_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/Akonadi/Notes
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/Akonadi/Notes
COMPONENT Devel
)
......@@ -55,7 +55,7 @@ install(FILES
${AkonadiNotes_HEADERS}
${CMAKE_CURRENT_BINARY_DIR}/akonadi-notes_export.h
${AkonadiNotes_CamelCase_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/akonadi/notes
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/akonadi/notes
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