Commit 8d480e1f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix build against qt6

parent 8b2a894b
Pipeline #119115 passed with stage
in 45 seconds
......@@ -9,12 +9,21 @@ set (RELEASE_SERVICE_COMPACT_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}${RELEASE_
project(ksudoku VERSION "1.4.${RELEASE_SERVICE_COMPACT_VERSION}")
set (QT_MIN_VERSION "5.15.0")
set (KF5_MIN_VERSION "5.89.0")
set (KF5_MIN_VERSION "5.90.0")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} )
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Qml Quick QuickWidgets PrintSupport Svg Test)
include(FeatureSummary)
include(ECMAddAppIcon)
include(ECMQtDeclareLoggingCategory)
include(ECMInstallIcons)
include(ECMSetupVersion)
include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Qml Quick QuickWidgets PrintSupport Svg Test)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Archive
Config
......@@ -33,24 +42,16 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
find_package(KF5KDEGames 4.9.0 REQUIRED)
find_package(Qt5OpenGL ${QT_MIN_VERSION})
find_package(Qt${QT_MAJOR_VERSION}OpenGL ${QT_MIN_VERSION})
find_package(OpenGL)
set_package_properties(OpenGL PROPERTIES DESCRIPTION "API for developing portable, interactive 2D and 3Dgraphics applications" TYPE OPTIONAL PURPOSE "KSudoku will not have Roxdoku support without OpenGL.")
include(FeatureSummary)
include(ECMAddAppIcon)
include(ECMQtDeclareLoggingCategory)
include(ECMInstallIcons)
include(ECMSetupVersion)
include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
add_definitions(
-DQT_DEPRECATED_WARNINGS_SINCE=0x060000
-DKF_DEPRECATED_WARNINGS_SINCE=0x060000
)
if (Qt5OpenGL_FOUND AND OPENGL_FOUND AND OPENGL_GLU_FOUND)
if (Qt${QT_MAJOR_VERSION}OpenGL_FOUND AND OPENGL_FOUND AND OPENGL_GLU_FOUND)
set(OPENGL_SUPPORT true)
endif()
......
......@@ -43,14 +43,14 @@ target_link_libraries(ksudoku_gui
KF5::JobWidgets
KF5::WidgetsAddons
KF5::XmlGui
Qt::Core
Qt::Gui
Qt::PrintSupport
Qt::Svg
Qt${QT_MAJOR_VERSION}::Core
Qt${QT_MAJOR_VERSION}::Gui
Qt${QT_MAJOR_VERSION}::PrintSupport
Qt${QT_MAJOR_VERSION}::Svg
)
if(OPENGL_SUPPORT)
target_link_libraries(ksudoku_gui
${OPENGL_LIBRARIES}
Qt::OpenGL)
Qt${QT_MAJOR_VERSION}::OpenGL)
endif(OPENGL_SUPPORT)
......@@ -4,4 +4,4 @@ set(ksudoku_logic_SRCS
)
add_library(ksudoku_logic STATIC ${ksudoku_logic_SRCS})
target_link_libraries(ksudoku_logic Qt::Core)
target_link_libraries(ksudoku_logic Qt${QT_MAJOR_VERSION}::Core)
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