Commit 15569c82 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt build system for building against qt6

parent 3ae2afc0
Pipeline #121010 passed with stage
in 55 seconds
......@@ -42,7 +42,7 @@ set(LIBKDEPIM_LIB_VERSION "5.19.40")
set(CALENDARSUPPORT_LIB_VERSION "5.19.40")
find_package(KF5Akonadi ${AKONADI_LIB_VERSION} CONFIG REQUIRED)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets)
find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets)
find_package(KF5I18n ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5Codecs ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5GuiAddons ${KF5_MIN_VERSION} CONFIG REQUIRED)
......@@ -104,12 +104,12 @@ install(EXPORT KF5EventViewsTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FIL
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/eventviews_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF} COMPONENT Devel
)
add_subdirectory(src)
if(BUILD_TESTING)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Test)
find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Test)
add_subdirectory(tests)
endif()
......
......@@ -137,7 +137,7 @@ PRIVATE
KF5::Contacts
)
target_include_directories(KF5EventViews INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/EventViews/;${KDE_INSTALL_INCLUDEDIR_KF5}/eventviews>")
target_include_directories(KF5EventViews INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/EventViews/;${KDE_INSTALL_INCLUDEDIR_KF}/eventviews>")
target_include_directories(KF5EventViews PUBLIC "$<BUILD_INTERFACE:${eventviews_SOURCE_DIR}/src;${eventviews_BINARY_DIR}/src;>")
set_target_properties(KF5EventViews PROPERTIES
......@@ -232,7 +232,7 @@ ecm_generate_headers(eventviews_CamelCasewhatsnext_HEADERS
ecm_generate_pri_file(BASE_NAME EventViews
LIB_NAME KF5EventViews
DEPS "KMime AkonadiCalendar" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR
${KDE_INSTALL_INCLUDEDIR_KF5}/EventViews
${KDE_INSTALL_INCLUDEDIR_KF}/EventViews
)
install(FILES
......@@ -245,7 +245,7 @@ install(FILES
${eventviews_CamelCasejournal_HEADERS}
${eventviews_CamelCaselist_HEADERS}
${eventviews_CamelCasemonth_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/EventViews
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/EventViews
COMPONENT Devel
)
......@@ -261,7 +261,7 @@ install(FILES
${eventviews_journal_HEADERS}
${eventviews_list_HEADERS}
${eventviews_month_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/eventviews
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/eventviews
COMPONENT Devel
)
......
......@@ -2,4 +2,4 @@
# SPDX-FileCopyrightText: none
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
ecm_add_test(monthitemordertest.cpp LINK_LIBRARIES Qt::Test KF5::EventViews)
ecm_add_test(monthitemordertest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5::EventViews)
......@@ -3,8 +3,8 @@
add_executable(createcolorgui_test createcolorgui_test.cpp createcolorgui_test.h)
ecm_mark_as_test(createcolorgui_test)
target_link_libraries(createcolorgui_test
Qt::Core
Qt::Gui
Qt${QT_MAJOR_VERSION}::Core
Qt${QT_MAJOR_VERSION}::Gui
KF5::EventViews
KF5::I18n
)
......
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