Commit 9286145c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt build system for building against qt6

parent 557f1ed2
Pipeline #121015 passed with stage
in 41 seconds
......@@ -35,7 +35,7 @@ set(GRANTLEETHEME_LIB_VERSION ${PIM_VERSION})
set(QT_REQUIRED_VERSION "5.15.2")
set(GRANTLEE_VERSION "5.2")
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Network)
find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Network)
find_package(KF5GuiAddons ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5I18n ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5IconThemes ${KF5_MIN_VERSION} CONFIG REQUIRED)
......@@ -81,13 +81,13 @@ install(EXPORT KF5GrantleeThemeTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/grantleetheme_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(autotest)
endif()
......
......@@ -2,9 +2,9 @@ add_definitions( -DGRANTLEETHEME_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data" )
add_definitions( -DGRANTLEETHEME_DATA_BUILD_DIR="${CMAKE_CURRENT_BINARY_DIR}/data" )
ecm_add_test(grantleethemetest.cpp
NAME_PREFIX "grantleetheme-"
LINK_LIBRARIES Qt::Test KF5::GrantleeTheme KF5::ConfigCore Qt::Gui KF5::ConfigWidgets
LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5::GrantleeTheme KF5::ConfigCore Qt${QT_MAJOR_VERSION}::Gui KF5::ConfigWidgets
)
ecm_add_test(grantleethememanagertest.cpp
NAME_PREFIX "grantleetheme-"
LINK_LIBRARIES Qt::Test KF5::GrantleeTheme KF5::ConfigCore KF5::XmlGui
LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5::GrantleeTheme KF5::ConfigCore KF5::XmlGui
)
......@@ -34,7 +34,7 @@ endif()
generate_export_header(KF5GrantleeTheme BASE_NAME grantleetheme)
target_include_directories(KF5GrantleeTheme INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/GrantleeTheme/;${KDE_INSTALL_INCLUDEDIR_KF5}/grantleetheme>")
target_include_directories(KF5GrantleeTheme INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/GrantleeTheme/;${KDE_INSTALL_INCLUDEDIR_KF}/grantleetheme>")
target_include_directories(KF5GrantleeTheme PUBLIC "$<BUILD_INTERFACE:${GrantleeTheme_SOURCE_DIR}/src;${GrantleeTheme_BINARY_DIR}/src;>")
......@@ -71,13 +71,13 @@ ecm_generate_headers(GrantleeTheme_CamelCase_HEADERS
ecm_generate_pri_file(BASE_NAME GrantleeTheme
LIB_NAME KF5GrantleeTheme
DEPS "" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/GrantleeTheme
DEPS "" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF}/GrantleeTheme
)
install(FILES
${GrantleeTheme_CamelCase_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/GrantleeTheme
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/GrantleeTheme
COMPONENT Devel
)
......@@ -85,7 +85,7 @@ install(FILES
${GrantleeTheme_HEADERS}
${CMAKE_CURRENT_BINARY_DIR}/grantleetheme_export.h
${GrantleeTheme_CamelCase_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/grantleetheme
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/grantleetheme
COMPONENT Devel
)
install(FILES
......
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