]> git.lyx.org Git - lyx.git/blobdiff - CMakeLists.txt
* LFUNs.lyx - regenerate
[lyx.git] / CMakeLists.txt
index d2435b81be1579263be6bb2aeae47360a6e8a963..0fb6cf284a0c6f35d3beafb8b460075e35064d27 100644 (file)
@@ -664,9 +664,9 @@ set(min_qt5_version "5.6")
 if(LYX_USE_QT MATCHES "AUTO")
        # try qt6 first
        find_package(Qt6Core CONFIG QUIET)
-       if (Qt6Core_Found)
+       if (Qt6Core_FOUND)
                set(LYX_USE_QT "QT6" CACHE STRING "Valid qt version" FORCE)
-               message(STATUS "Qt5Core_VERSION = ${Qt5Core_VERSION}")
+               message(STATUS "Qt6Core_VERSION = ${Qt6Core_VERSION}")
        else()
                find_package(Qt5Core CONFIG QUIET)
                if(Qt5Core_FOUND)
@@ -833,11 +833,17 @@ if(LYX_USE_QT MATCHES "QT6|QT5")
                endif()
                if (LYX_USE_QT MATCHES "QT6")
                        get_target_property(QT_MOC_EXECUTABLE Qt6::moc LOCATION)
-                       find_package(Qt6 COMPONENTS Core5Compat REQUIRED)
+                       #find_package(Qt6 COMPONENTS Core5Compat REQUIRED)
+                       # We don't know why QtZlib is included, and ideally we
+                       # would have a different fix than relying on this
+                       # variable (which as "Private" in the name indicates,
+                       # it might be a fragile workaround).
+                       # See ML discussion here:
+                       # https://www.mail-archive.com/search?l=mid&q=CAGU9VOqpkngYBumnNh%3DcuzQ585GsS7TJbhHa903nJSfy-davRg%40mail.gmail.com
                        list(REMOVE_ITEM Qt6Core5Compat_INCLUDE_DIRS ${_Qt6ZlibPrivate_OWN_INCLUDE_DIRS})
                        include_directories(${Qt6Core5Compat_INCLUDE_DIRS})
-                       set(QtCore5CompatLibrary Qt6::Core5Compat)
-                       set(QtCore5CompatModule Core5Compat)
+                       #set(QtCore5CompatLibrary Qt6::Core5Compat)
+                       #set(QtCore5CompatModule Core5Compat)
                endif()
        endif()
 else()