Browse Source

cmake: Only search for Qt when we need to

When YUZU_USE_BUNDLED_QT was specified on a system with a compliant Qt
version installed, CMake configuration would cause an error due to
mixing YUZU_USE_BUNDLED_QT with the system Qt.

Solution is to only search for Qt when YUZU_USE_BUNDLED_QT is disabled.
lat9nq 5 năm trước cách đây
mục cha
commit
4c6cc67520
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      CMakeLists.txt

+ 3 - 1
CMakeLists.txt

@@ -254,7 +254,9 @@ if(ENABLE_QT)
 
     # Check for system Qt on Linux, fallback to bundled Qt
     if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-        find_package(Qt5 ${QT_VERSION} COMPONENTS Widgets)
+        if (NOT YUZU_USE_BUNDLED_QT)
+            find_package(Qt5 ${QT_VERSION} COMPONENTS Widgets)
+        endif()
         if (NOT Qt5_FOUND OR YUZU_USE_BUNDLED_QT)
             # Check for dependencies, then enable bundled Qt download