From 49f217d43697eeae4d91ef2e33ff506fa3ea7e24 Mon Sep 17 00:00:00 2001 From: Ilya Kotov <iokotov@astralinux.ru> Date: Sat, 15 Feb 2025 00:25:32 +0300 Subject: [PATCH] changed minimal Qt version to 6.2 --- CMakeLists.txt | 9 ++++++--- README | 6 +++--- qt6ct.pri | 9 ++++----- src/qt6ct-common/CMakeLists.txt | 2 -- src/qt6ct-qtplugin/CMakeLists.txt | 2 -- src/qt6ct-style/CMakeLists.txt | 2 -- 6 files changed, 13 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d6b608c..0002032 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16.0) +cmake_minimum_required(VERSION 3.18.0) project(qt6ct LANGUAGES CXX) @@ -20,11 +20,14 @@ set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) +set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_BUILD_RPATH_USE_ORIGIN ON) -add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000 -DUSE_WIDGETS) +add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060200 -DUSE_WIDGETS -DQT_DEPRECATED_WARNINGS -DQT_MESSAGELOGCONTEXT) +add_compile_options(-Wall -Wextra) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src) -find_package(Qt6 REQUIRED COMPONENTS BuildInternals Core Widgets OPTIONAL_COMPONENTS LinguistTools) +find_package(Qt6 6.2 CONFIG REQUIRED COMPONENTS BuildInternals Core Widgets OPTIONAL_COMPONENTS LinguistTools) get_target_property(QT_QTPATHS_EXECUTABLE Qt6::qtpaths IMPORTED_LOCATION) diff --git a/README b/README index 618f0d1..d3b9fc8 100644 --- a/README +++ b/README @@ -8,9 +8,9 @@ Official home page: https://www.opencode.net/trialuser/qt6ct Requirements: - GNU Linux or FreeBSD -- qtbase >= 6.0.0 -- qtsvg >= 6.0.0 (Runtime dependency for the SVG icon support) -- qttools >= 6.0.0 (For build only) +- qtbase >= 6.2.0 +- qtsvg >= 6.2.0 (Runtime dependency for the SVG icon support) +- qttools >= 6.2.0 (For build only) Installation: diff --git a/qt6ct.pri b/qt6ct.pri index 2a57b48..d02bbd9 100644 --- a/qt6ct.pri +++ b/qt6ct.pri @@ -8,8 +8,8 @@ QMAKE_DISTCLEAN += -r .build QMAKE_DISTCLEAN += translations/*.qm CONFIG += hide_symbols c++17 ordered -DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 QT_DEPRECATED_WARNINGS_SINCE=0x060200 -DEFINES += QT_NO_CAST_FROM_BYTEARRAY QT_STRICT_ITERATORS QT_NO_FOREACH +DEFINES += QT_NO_CAST_FROM_BYTEARRAY QT_STRICT_ITERATORS QT_NO_FOREACH QT_MESSAGELOGCONTEXT +DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060200 QT_DEPRECATED_WARNINGS QMAKE_DISTCLEAN += -r .build #*-g++ { @@ -21,9 +21,8 @@ INCLUDEPATH += ../qt6ct-common QMAKE_LIBDIR += ../qt6ct-common LIBS += -lqt6ct-common - -!isEqual (QT_MAJOR_VERSION, 6) { - error("Use Qt 6.0.0 or higher.") +!isEqual(QT_MAJOR_VERSION, 6)|!greaterThan(QT_MINOR_VERSION, 1) { + error("Use Qt 6.2.0 or higher.") } #Install paths diff --git a/src/qt6ct-common/CMakeLists.txt b/src/qt6ct-common/CMakeLists.txt index f748167..3b9f0b9 100644 --- a/src/qt6ct-common/CMakeLists.txt +++ b/src/qt6ct-common/CMakeLists.txt @@ -22,8 +22,6 @@ set(app_SRCS qt6ct.cpp ) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../) - add_library(qt6ct-common SHARED ${app_SRCS}) set_target_properties(qt6ct-common PROPERTIES VERSION ${QT6CT_VERSION}) target_link_libraries(qt6ct-common PRIVATE Qt6::Gui) diff --git a/src/qt6ct-qtplugin/CMakeLists.txt b/src/qt6ct-qtplugin/CMakeLists.txt index c3d7498..93a2b84 100644 --- a/src/qt6ct-qtplugin/CMakeLists.txt +++ b/src/qt6ct-qtplugin/CMakeLists.txt @@ -5,8 +5,6 @@ set(app_SRCS qt6ctplatformtheme.cpp ) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../) - add_library(qt6ct-qtplugin MODULE ${app_SRCS}) set_target_properties(qt6ct-qtplugin PROPERTIES OUTPUT_NAME qt6ct) target_link_libraries(qt6ct-qtplugin PRIVATE Qt6::Widgets Qt6::GuiPrivate qt6ct-common) diff --git a/src/qt6ct-style/CMakeLists.txt b/src/qt6ct-style/CMakeLists.txt index ea8f426..5ab1c21 100644 --- a/src/qt6ct-style/CMakeLists.txt +++ b/src/qt6ct-style/CMakeLists.txt @@ -7,8 +7,6 @@ set(app_SRCS qt6ctproxystyle.cpp ) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../) - add_library(qt6ct-style MODULE ${app_SRCS}) target_link_libraries(qt6ct-style PRIVATE Qt6::Widgets qt6ct-common) install(TARGETS qt6ct-style DESTINATION ${PLUGINDIR}/styles) -- GitLab