mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-12 04:35:56 +00:00
Extend Qt detection to support multiple drives (#3209)
Some checks are pending
Build and Release / get-info (push) Waiting to run
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
Some checks are pending
Build and Release / get-info (push) Waiting to run
Build and Release / reuse (push) Waiting to run
Build and Release / clang-format (push) Waiting to run
Build and Release / windows-sdl (push) Blocked by required conditions
Build and Release / windows-qt (push) Blocked by required conditions
Build and Release / macos-sdl (push) Blocked by required conditions
Build and Release / macos-qt (push) Blocked by required conditions
Build and Release / linux-sdl (push) Blocked by required conditions
Build and Release / linux-qt (push) Blocked by required conditions
Build and Release / linux-sdl-gcc (push) Blocked by required conditions
Build and Release / linux-qt-gcc (push) Blocked by required conditions
Build and Release / pre-release (push) Blocked by required conditions
This commit is contained in:
parent
e5f899aae3
commit
df4314f831
1 changed files with 24 additions and 10 deletions
|
@ -1,14 +1,28 @@
|
||||||
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
file(GLOB QT_KITS LIST_DIRECTORIES true "C:/Qt/*/msvc*_64")
|
set(highest_version "0")
|
||||||
list(SORT QT_KITS COMPARE NATURAL)
|
set(CANDIDATE_DRIVES A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
|
||||||
list(REVERSE QT_KITS)
|
|
||||||
if(QT_KITS)
|
|
||||||
list(GET QT_KITS 0 QT_PREFIX)
|
|
||||||
set(CMAKE_PREFIX_PATH "${QT_PREFIX}" CACHE PATH "Qt prefix auto‑detected" FORCE)
|
|
||||||
message(STATUS "Auto-detected Qt prefix: ${QT_PREFIX}")
|
|
||||||
else()
|
|
||||||
message(STATUS "findQt.cmake: no Qt‑Directory found in C:/Qt – please set CMAKE_PREFIX_PATH manually")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
foreach(drive ${CANDIDATE_DRIVES})
|
||||||
|
file(GLOB kits LIST_DIRECTORIES true CONFIGURE_DEPENDS "${drive}:/Qt/*/msvc*_64")
|
||||||
|
foreach(kit IN LISTS kits)
|
||||||
|
get_filename_component(version_dir "${kit}" DIRECTORY)
|
||||||
|
get_filename_component(kit_version "${version_dir}" NAME)
|
||||||
|
|
||||||
|
message(STATUS "DetectQtInstallation.cmake: Detected Qt: ${kit}")
|
||||||
|
|
||||||
|
if (kit_version VERSION_GREATER highest_version)
|
||||||
|
set(highest_version "${kit_version}")
|
||||||
|
set(QT_PREFIX "${kit}")
|
||||||
|
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if(QT_PREFIX)
|
||||||
|
set(CMAKE_PREFIX_PATH "${QT_PREFIX}" CACHE PATH "Qt prefix auto‑detected" FORCE)
|
||||||
|
message(STATUS "DetectQtInstallation.cmake: Choose newest Qt: ${QT_PREFIX}")
|
||||||
|
else()
|
||||||
|
message(STATUS "DetectQtInstallation.cmake: No Qt‑Directory found in <drive>:/Qt – please set CMAKE_PREFIX_PATH manually")
|
||||||
|
endif()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue