Commit e72a35a9 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt build system for building against qt6

parent 473eff07
Pipeline #113289 passed with stage
in 44 seconds
......@@ -17,7 +17,7 @@ cmake_minimum_required (VERSION 3.16 FATAL_ERROR)
project(Filelight VERSION ${FILELIGHT_VERSION})
set(PROJECT_VERSION ${RELEASE_SERVICE_VERSION})
set(KF5_MIN_VERSION "5.85.0")
set(KF5_MIN_VERSION "5.89.0")
set(QT_REQUIRED_VERSION "5.15.0")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
......@@ -35,7 +35,10 @@ include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMQtDeclareLoggingCategory)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Core Widgets Svg)
find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} CONFIG REQUIRED Core Widgets Svg)
if (QT_MAJOR_VERSION STREQUAL "6")
find_package(Qt6Core5Compat)
endif()
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
XmlGui # For app
KIO # For part
......
include(ECMAddTests)
find_package(Qt5Test ${QT_MIN_VERSION} REQUIRED Test)
find_package(Qt${QT_MAJOR_VERSION}Test ${QT_MIN_VERSION} REQUIRED Test)
find_package(KF5CoreAddons ${KF5_DEP_VERSION} REQUIRED)
add_subdirectory(core)
......@@ -6,6 +6,6 @@ SET(FILENAME_TEST_SRCS
ecm_add_test(
${FILENAME_TEST_SRCS}
TEST_NAME "filetree_test"
LINK_LIBRARIES Qt::Test
LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test
KF5::CoreAddons
)
......@@ -6,7 +6,7 @@
install(PROGRAMS org.kde.filelight.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES filelightrc DESTINATION ${KDE_INSTALL_CONFDIR})
install(FILES filelightui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}//filelight)
install(FILES filelightui.rc DESTINATION ${KDE_INSTALL_KXMLGUIDIR}/filelight)
install(FILES org.kde.filelight.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
ecm_install_icons(ICONS
......
......@@ -59,7 +59,7 @@ target_link_libraries(filelight
KF5::I18n
KF5::XmlGui
KF5::KIOWidgets # Only used for KDirLister, may be able to move away from that.
Qt::Svg
Qt${QT_MAJOR_VERSION}::Svg
)
if (WIN32)
find_package(KDEWin REQUIRED)
......
Supports Markdown
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