commit 7c8f3a5d28bf7d9e745e5c1d8e36f4e40778bfa9
Author: Kornel Benko <kor...@lyx.org>
Date:   Sat Apr 6 10:34:00 2024 +0200

    Cmake build: Check for needed qt6 required packages before using QT6
    compilation
---
 CMakeLists.txt | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f473ee4bc5..4a843029f2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -663,7 +663,16 @@ endif()
 set(min_qt5_version "5.6")
 if(LYX_USE_QT MATCHES "AUTO")
        # try qt6 first
-       find_package(Qt6Core CONFIG QUIET)
+       foreach(_mod Core Gui Widgets Concurrent Svg)
+               find_package(Qt6${_mod} CONFIG QUIET)
+               if (NOT Qt6${_mod}_FOUND)
+                       message(STATUS "Not found Qt6${_mod}, aborting use of 
QT6")
+                       set(Qt6Core_FOUND OFF)
+                       break()
+               else()
+                       message(STATUS "Found Qt6${_mod}")
+               endif()
+       endforeach()
        if (Qt6Core_FOUND)
                set(LYX_USE_QT "QT6" CACHE STRING "Valid qt version" FORCE)
                message(STATUS "Qt6Core_VERSION = ${Qt6Core_VERSION}")
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to