rename cmake file, add check before running cmake and add inheritation to presets

This commit is contained in:
Fire Cube 2025-06-22 19:23:54 +02:00
parent bee3f1075d
commit 321ed8b267
4 changed files with 40 additions and 68 deletions

View file

@ -0,0 +1,14 @@
# SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
# SPDX-License-Identifier: GPL-2.0-or-later
file(GLOB QT_KITS LIST_DIRECTORIES true "C:/Qt/*/msvc*")
list(SORT QT_KITS COMPARE NATURAL)
list(REVERSE QT_KITS)
list(GET QT_KITS 0 QT_PREFIX)
if(QT_PREFIX)
set(CMAKE_PREFIX_PATH "${QT_PREFIX}" CACHE PATH "Qt prefix autodetected" FORCE)
message(STATUS "Auto-detected Qt prefix: ${QT_PREFIX}")
else()
message(WARNING "findQt.cmake: no QtDirectory found in C:/Qt please set CMAKE_PREFIX_PATH manually")
endif()