Commit 7df05d9c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt build system for building against qt6

parent 27362972
Pipeline #121416 passed with stage
in 1 minute and 36 seconds
......@@ -103,7 +103,7 @@ install(EXPORT KF5CalendarUtilsTargets
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/kcalutils_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}
COMPONENT Devel
)
......
......@@ -3,7 +3,7 @@
include(ECMAddTests)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Test)
find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Test)
set(TEST_DATA_DIR "${CMAKE_CURRENT_SOURCE_DIR}/data")
set(TEST_TEMPLATE_PATH "${CMAKE_SOURCE_DIR}/templates")
......@@ -12,14 +12,14 @@ configure_file(test_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/test_config.h @ON
ecm_add_tests(testdndfactory.cpp teststringify.cpp testtodotooltip.cpp
NAME_PREFIX "kcalutils-"
LINK_LIBRARIES KF5CalendarUtils KF5::I18n Qt::Test
LINK_LIBRARIES KF5CalendarUtils KF5::I18n Qt${QT_MAJOR_VERSION}::Test
)
ecm_add_test(testincidenceformatter.cpp
TEST_NAME "testincidenceformatter"
NAME_PREFIX "kcalutils-"
LINK_LIBRARIES KF5CalendarUtils Qt::Core Qt::Test KF5::CalendarCore KF5::I18n KF5::IdentityManagement Grantlee5::Templates
LINK_LIBRARIES KF5CalendarUtils Qt${QT_MAJOR_VERSION}::Core Qt${QT_MAJOR_VERSION}::Test KF5::CalendarCore KF5::I18n KF5::IdentityManagement Grantlee5::Templates
)
# Make sure that dates are formatted in C locale
......
......@@ -48,12 +48,12 @@ generate_export_header(KF5CalendarUtils BASE_NAME kcalutils)
target_include_directories(KF5CalendarUtils INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/KCalUtils;${KDE_INSTALL_INCLUDEDIR_KF5}/KCalUtils/kcalutils>")
target_include_directories(KF5CalendarUtils INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KCalUtils;${KDE_INSTALL_INCLUDEDIR_KF}/KCalUtils/kcalutils>")
target_include_directories(KF5CalendarUtils PUBLIC "$<BUILD_INTERFACE:${KCalUtils_SOURCE_DIR}/src;${KCalUtils_BINARY_DIR}/src>")
target_link_libraries(KF5CalendarUtils
PUBLIC
Qt::Widgets
Qt${QT_MAJOR_VERSION}::Widgets
KF5::CalendarCore
KF5::CoreAddons
KF5::ConfigGui
......@@ -95,13 +95,13 @@ install(FILES
${CMAKE_CURRENT_BINARY_DIR}/kcalutils_export.h
${CMAKE_CURRENT_BINARY_DIR}/htmlexportsettings.h
${KCalUtils_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KCalUtils/kcalutils
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KCalUtils/kcalutils
COMPONENT Devel
)
install(FILES
${KCalUtils_CamelCase_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KCalUtils/KCalUtils/
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KCalUtils/KCalUtils/
COMPONENT Devel
)
......@@ -132,5 +132,5 @@ endif()
ecm_qt_install_logging_categories(EXPORT KCALUTILS FILE kcalutils.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
ecm_generate_pri_file(BASE_NAME KCalUtils LIB_NAME KF5CalendarUtils DEPS "KConfigGui KCalendarCore KCoreAddons" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/KCalUtils)
ecm_generate_pri_file(BASE_NAME KCalUtils LIB_NAME KF5CalendarUtils DEPS "KConfigGui KCalendarCore KCoreAddons" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF}/KCalUtils)
install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
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