From c19bcede078fe6afc50b2128c9cc183bb944bc4a Mon Sep 17 00:00:00 2001 From: Hillwood Yang Date: Mon, 27 Oct 2025 16:19:11 +0800 Subject: [PATCH] fix: (cmake) Fix Qt version check variable name The condition used `Qt6_VERSION`, which is not defined by `find_package(QT ...)`. Replace it with the correct variable `QT_VERSION` to ensure the version check works properly with Qt 6.10 and later. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c5312a8..7c2b6965 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ option(ENABLE_COV "Enable code coverage" OFF) if(PROJECT_VERSION_MAJOR EQUAL 6) set(VERSION_SUFFIX 6) find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core) - if(Qt6_VERSION VERSION_GREATER_EQUAL 6.10) + if(QT_VERSION VERSION_GREATER_EQUAL 6.10) find_package(Qt6 COMPONENTS CorePrivate GuiPrivate WidgetsPrivate REQUIRED) endif() else()