Commit 61bb1e7a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt build system for building against qt6

parent 4c76f261
Pipeline #120983 passed with stage
in 1 minute and 19 seconds
......@@ -39,7 +39,7 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX KTNEF
########### Find packages ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Tnef")
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets)
find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets)
find_package(KF5CalendarCore ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5CalendarUtils ${CALENDARUTILS_LIB_VERSION} CONFIG REQUIRED)
find_package(KF5Contacts ${KF5_MIN_VERSION} CONFIG REQUIRED)
......@@ -70,7 +70,7 @@ install(EXPORT KF5TnefTargets
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/ktnef_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}
COMPONENT Devel
)
......
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
include(ECMAddTests)
find_package(Qt5Test ${QT_REQUIRED_VERSION} CONFIG REQUIRED)
find_package(Qt${QT_MAJOR_VERSION}Test ${QT_REQUIRED_VERSION} CONFIG REQUIRED)
configure_file(config-ktnef-tests.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-ktnef-tests.h)
ecm_add_tests( parsertest.cpp NAME_PREFIX "ktnetf-" LINK_LIBRARIES KF5Tnef Qt::Test)
ecm_add_tests( parsertest.cpp NAME_PREFIX "ktnetf-" LINK_LIBRARIES KF5Tnef Qt${QT_MAJOR_VERSION}::Test)
......@@ -34,7 +34,7 @@ generate_export_header(KF5Tnef BASE_NAME ktnef)
target_include_directories(KF5Tnef INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/KTNEF>")
target_include_directories(KF5Tnef INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/KTNEF>")
target_include_directories(KF5Tnef PUBLIC "$<BUILD_INTERFACE:${KTnef_SOURCE_DIR}/src;${KTnef_BINARY_DIR}/src>")
target_link_libraries(KF5Tnef
......@@ -68,15 +68,15 @@ ecm_generate_headers(KTnef_CamelCase_HEADERS
REQUIRED_HEADERS KTnef_HEADERS
)
install(FILES ${KTnef_CamelCase_HEADERS} DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KTNEF/KTNEF/ COMPONENT Devel)
install(FILES ${KTnef_CamelCase_HEADERS} DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KTNEF/KTNEF/ COMPONENT Devel)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/ktnef_export.h
${KTnef_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KTNEF/ktnef
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KTNEF/ktnef
COMPONENT Devel
)
ecm_generate_pri_file(BASE_NAME KTNef LIB_NAME KF5Tnef DEPS "KCalendarCore" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/KTNEF)
ecm_generate_pri_file(BASE_NAME KTNef LIB_NAME KF5Tnef DEPS "KCalendarCore" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF}/KTNEF)
install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
ecm_qt_install_logging_categories(EXPORT KTNEF FILE ktnef.categories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
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