Commit 081d5ebb authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt build system for building against qt6

parent 6850bca5
Pipeline #121285 passed with stage
in 1 minute and 54 seconds
......@@ -47,7 +47,7 @@ set(AKONADI_MIMELIB_VERSION "5.19.40")
set(KMIME_LIB_VERSION "5.19.40")
set(QT_REQUIRED_VERSION "5.15.2")
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Core Test)
find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Core Test)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS I18n Config Crash DBusAddons KCMUtils KIO)
if (AKONADISEARCH_ENABLE_KRUNNER_RUNNER)
find_package(KF5Runner ${KF5_MIN_VERSION} REQUIRED)
......@@ -137,7 +137,7 @@ install(EXPORT KF5AkonadiSearchTargets
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/akonadi_search_version.h"
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}
COMPONENT Devel
)
......
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(Qt5Core "@QT_REQUIRED_VERSION@")
find_dependency(Qt@QT_MAJOR_VERSION@Core "@QT_REQUIRED_VERSION@")
find_dependency(KF5CoreAddons "@KF5_MIN_VERSION@")
find_dependency(KF5Akonadi "@AKONADI_VERSION@")
find_dependency(KF5Contacts "@KF5_MIN_VERSION@")
......
......@@ -49,7 +49,7 @@ if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
endif()
target_link_libraries(akonadi_indexing_agent
Qt::Core
Qt${QT_MAJOR_VERSION}::Core
KF5::AkonadiCore
KF5::AkonadiMime
KF5::Mime
......@@ -61,7 +61,7 @@ target_link_libraries(akonadi_indexing_agent
KF5::Codecs
KF5::I18n
KF5::ConfigCore
Qt::Widgets
Qt${QT_MAJOR_VERSION}::Widgets
)
install(TARGETS akonadi_indexing_agent ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -17,7 +17,7 @@ set(indexer_SRCS
)
set(indexer_LIBS
Qt::Test
Qt${QT_MAJOR_VERSION}::Test
KF5::AkonadiCore
KF5::AkonadiMime
KF5::AkonadiAgentBase
......@@ -71,8 +71,8 @@ target_link_libraries(collectionquerytest
KF5::AkonadiSearchPIM
KF5::AkonadiAgentBase
KF5::ConfigCore
Qt::Widgets
Qt::DBus
Qt${QT_MAJOR_VERSION}::Widgets
Qt${QT_MAJOR_VERSION}::DBus
)
endif()
endif()
......@@ -5,12 +5,12 @@ include_directories(
add_executable(emailindexer emailtest.cpp ../emailindexer.cpp ../abstractindexer.cpp ../akonadi_indexer_agent_debug.cpp)
target_link_libraries(emailindexer
Qt::Test
Qt${QT_MAJOR_VERSION}::Test
KF5::AkonadiCore
KF5::AkonadiMime
KF5::Mime
KF5::AkonadiSearchPIM
KF5::AkonadiSearchXapian
KF5::Codecs
Qt::Widgets
Qt${QT_MAJOR_VERSION}::Widgets
)
......@@ -31,7 +31,7 @@ add_test( NAME searchplugintest COMMAND searchplugintest )
ecm_mark_as_test(searchplugintest)
target_link_libraries(searchplugintest
Qt::Test
Qt${QT_MAJOR_VERSION}::Test
KF5::AkonadiCore
KF5::AkonadiMime
KF5::Mime
......
......@@ -28,7 +28,7 @@ endif()
target_link_libraries(KF5AkonadiSearchCore
PUBLIC
Qt::Core
Qt${QT_MAJOR_VERSION}::Core
)
set_target_properties(KF5AkonadiSearchCore PROPERTIES
......@@ -36,7 +36,7 @@ set_target_properties(KF5AkonadiSearchCore PROPERTIES
SOVERSION ${AKONADISEARCH_SOVERSION}
EXPORT_NAME AkonadiSearchCore
)
target_include_directories(KF5AkonadiSearchCore INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/AkonadiSearch/Core>")
target_include_directories(KF5AkonadiSearchCore INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/AkonadiSearch/Core>")
generate_export_header(KF5AkonadiSearchCore BASE_NAME AKONADI_SEARCH_CORE EXPORT_FILE_NAME search_core_export.h)
......@@ -49,6 +49,6 @@ install(FILES
resultiterator.h
${CMAKE_CURRENT_BINARY_DIR}/search_core_export.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/AkonadiSearch/Core
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/AkonadiSearch/Core
COMPONENT Devel
)
......@@ -26,7 +26,7 @@ generate_export_header(KF5AkonadiSearchDebug BASE_NAME AKONADI_SEARCH_DEBUG EXPO
target_link_libraries(KF5AkonadiSearchDebug
PRIVATE
Qt::Widgets
Qt${QT_MAJOR_VERSION}::Widgets
KF5::I18n
KF5::AkonadiCore
KF5::WidgetsAddons
......@@ -40,7 +40,7 @@ set_target_properties(KF5AkonadiSearchDebug PROPERTIES
EXPORT_NAME AkonadiSearchDebug
)
target_include_directories(KF5AkonadiSearchDebug INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/AkonadiSearch>")
target_include_directories(KF5AkonadiSearchDebug INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/AkonadiSearch>")
install(TARGETS KF5AkonadiSearchDebug EXPORT KF5AkonadiSearchTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
......@@ -48,7 +48,7 @@ install(FILES
akonadisearchdebugdialog.h
akonadisearchdebugsearchpathcombobox.h
${CMAKE_CURRENT_BINARY_DIR}/search_debug_export.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/AkonadiSearch/Debug
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/AkonadiSearch/Debug
COMPONENT Devel
)
......
......@@ -5,7 +5,7 @@ include_directories(
macro(add_akonadisearchdebug_unittest _source)
ecm_add_test(${_source}
NAME_PREFIX "akonadisearchdebug-"
LINK_LIBRARIES Qt::Test Qt::Gui KF5::Completion KF5::CoreAddons KF5::AkonadiSearchDebug KF5::AkonadiCore
LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test Qt${QT_MAJOR_VERSION}::Gui KF5::Completion KF5::CoreAddons KF5::AkonadiSearchDebug KF5::AkonadiCore
GUI
)
endmacro ()
......
......@@ -5,9 +5,9 @@ include_directories(
add_executable(akonadisearchdebug_dialog_gui akonadisearchdebug_dialog_gui.cpp)
ecm_mark_as_test(akonadisearchdebug_dialog_gui)
target_link_libraries(akonadisearchdebug_dialog_gui
Qt::Core
Qt::Gui
Qt::Widgets
Qt${QT_MAJOR_VERSION}::Core
Qt${QT_MAJOR_VERSION}::Gui
Qt${QT_MAJOR_VERSION}::Widgets
KF5::AkonadiCore
KF5::I18n
KF5::AkonadiSearchDebug
......
......@@ -57,7 +57,7 @@ generate_export_header(KF5AkonadiSearchPIM BASE_NAME AKONADI_SEARCH_PIM EXPORT_F
target_link_libraries(KF5AkonadiSearchPIM
PUBLIC
Qt::Core
Qt${QT_MAJOR_VERSION}::Core
PRIVATE
KF5::AkonadiCore
......@@ -70,7 +70,7 @@ set_target_properties(KF5AkonadiSearchPIM PROPERTIES
EXPORT_NAME AkonadiSearchPIM
)
target_include_directories(KF5AkonadiSearchPIM INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/AkonadiSearch>")
target_include_directories(KF5AkonadiSearchPIM INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/AkonadiSearch>")
install(TARGETS KF5AkonadiSearchPIM EXPORT KF5AkonadiSearchTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
......@@ -90,7 +90,7 @@ install(FILES
${AKONADISEARCH_INCLUDES}
${CMAKE_CURRENT_BINARY_DIR}/search_pim_export.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/AkonadiSearch/PIM
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/AkonadiSearch/PIM
COMPONENT Devel
)
......
......@@ -5,7 +5,7 @@ include_directories(
macro(add_search_test name)
ecm_add_test("${name}test.cpp"
TEST_NAME "${test}"
LINK_LIBRARIES Qt::Core KF5::AkonadiCore KF5::AkonadiMime KF5::Mime KF5::Contacts KF5::AkonadiSearchPIM
LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Core KF5::AkonadiCore KF5::AkonadiMime KF5::Mime KF5::Contacts KF5::AkonadiSearchPIM
)
endmacro()
......
......@@ -37,7 +37,7 @@ target_sources(kcm_krunner_pimcontacts PRIVATE
)
target_link_libraries(kcm_krunner_pimcontacts
Qt::Gui
Qt${QT_MAJOR_VERSION}::Gui
KF5::KCMUtils
KF5::I18n
)
......
add_library(calendarsearchstore MODULE )
target_sources(calendarsearchstore PRIVATE calendarsearchstore.cpp ../pimsearchstore.cpp calendarsearchstore.h ../pimsearchstore.h)
target_link_libraries(calendarsearchstore
Qt::Core
Qt${QT_MAJOR_VERSION}::Core
KF5::AkonadiCore
${XAPIAN_LIBRARIES}
KF5AkonadiSearchCore
......
add_library(contactsearchstore MODULE )
target_sources(contactsearchstore PRIVATE contactsearchstore.cpp ../pimsearchstore.cpp contactsearchstore.h ../pimsearchstore.h)
target_link_libraries(contactsearchstore
Qt::Core
Qt${QT_MAJOR_VERSION}::Core
KF5::AkonadiCore
${XAPIAN_LIBRARIES}
KF5AkonadiSearchCore
......
add_library(emailsearchstore MODULE )
target_sources(emailsearchstore PRIVATE agepostingsource.cpp emailsearchstore.cpp ../pimsearchstore.cpp agepostingsource.h emailsearchstore.h ../pimsearchstore.h)
target_link_libraries(emailsearchstore
Qt::Core
Qt${QT_MAJOR_VERSION}::Core
KF5::AkonadiCore
${XAPIAN_LIBRARIES}
KF5AkonadiSearchCore
......
add_library(notesearchstore MODULE)
target_sources(notesearchstore PRIVATE notesearchstore.cpp ../pimsearchstore.cpp notesearchstore.h ../pimsearchstore.h)
target_link_libraries(notesearchstore
Qt::Core
Qt${QT_MAJOR_VERSION}::Core
KF5::AkonadiCore
${XAPIAN_LIBRARIES}
KF5AkonadiSearchCore
......
......@@ -31,7 +31,7 @@ endif()
target_link_libraries(KF5AkonadiSearchXapian PUBLIC
Qt::Core
Qt${QT_MAJOR_VERSION}::Core
KF5::AkonadiSearchCore
${XAPIAN_LIBRARIES}
)
......@@ -54,7 +54,7 @@ install(FILES
xapiantermgenerator.h
${CMAKE_CURRENT_BINARY_DIR}/search_xapian_export.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/AkonadiSearch/Xapian
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/AkonadiSearch/Xapian
COMPONENT Devel
)
......
ecm_add_test(termgeneratortest.cpp termgeneratortest.h
TEST_NAME "termgeneratortest"
LINK_LIBRARIES Qt::Test KF5::AkonadiSearchXapian
LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5::AkonadiSearchXapian
)
ecm_add_test(queryparsertest.cpp queryparsertest.h
TEST_NAME "queryparsertest"
LINK_LIBRARIES Qt::Test KF5::AkonadiSearchXapian
LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5::AkonadiSearchXapian
)
add_executable(writeiotest writeiotest.cpp)
target_link_libraries(writeiotest
Qt::Core
Qt${QT_MAJOR_VERSION}::Core
KF5::AkonadiSearchXapian
)
add_executable(memorytest memorytest.cpp)
target_link_libraries(memorytest
Qt::Core
Qt${QT_MAJOR_VERSION}::Core
KF5::AkonadiSearchXapian
)
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