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.
This commit is contained in:
lat9nq 2021-07-15 05:25:00 -04:00
parent a36d2b942b
commit 4c6cc67520

View file

@ -254,7 +254,9 @@ if(ENABLE_QT)
# Check for system Qt on Linux, fallback to bundled Qt
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
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