diff options
author | bunnei <bunneidev@gmail.com> | 2021-07-17 21:47:52 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-17 21:47:52 -0400 |
commit | 8b53209362de581f3e98a85fa4a85fdc002f23ba (patch) | |
tree | a48d4df45a1cba38a89869efd0fe12e0baa0b7e5 | |
parent | c42c3561b8fc6c4523b416ab288c76c7911c2634 (diff) | |
parent | 4c6cc675201c1a17d674b7910233a1d8eb474077 (diff) |
Merge pull request #6647 from lat9nq/specify-system-path
cmake: Be more specific with Qt
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 716256cd5..de93ca2c2 100644 --- a/CMakeLists.txt +++ b/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 @@ -337,6 +339,8 @@ if(ENABLE_QT) endif() endif() + set(YUZU_QT_NO_CMAKE_SYSTEM_PATH) + # Workaround for an issue where conan tries to build Qt from scratch instead of download prebuilt binaries set(QT_PREFIX_HINT) @@ -354,8 +358,10 @@ if(ENABLE_QT) endif() set(QT_PREFIX_HINT HINTS "${QT_PREFIX}") + + set(YUZU_QT_NO_CMAKE_SYSTEM_PATH "NO_CMAKE_SYSTEM_PATH") endif() - find_package(Qt5 ${QT_VERSION} REQUIRED COMPONENTS Widgets ${QT_PREFIX_HINT} NO_CMAKE_SYSTEM_PATH) + find_package(Qt5 ${QT_VERSION} REQUIRED COMPONENTS Widgets ${QT_PREFIX_HINT} ${YUZU_QT_NO_CMAKE_SYSTEM_PATH}) if (YUZU_USE_QT_WEB_ENGINE) find_package(Qt5 COMPONENTS WebEngineCore WebEngineWidgets) endif() |