vcpkg: Dont't build Qt from source

* Currently vcpkg has no mechanism of consistently handling prebuilt
  libraries. This means that large libraries like Qt need special
  treatment
This commit is contained in:
emufan4568
2022-07-16 16:32:51 +03:00
parent 60f0269569
commit d865780291
2 changed files with 22 additions and 8 deletions

View File

@ -210,11 +210,30 @@ else()
set(SDL2_FOUND NO)
endif()
if (ENABLE_QT)
find_package(Qt5 REQUIRED COMPONENTS Widgets Multimedia)
if (CITRA_USE_BUNDLED_QT)
if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64)
set(QT_VER qt-5.10.0-msvc2017_64)
else()
message(FATAL_ERROR "No bundled Qt binaries for your toolchain. Disable CITRA_USE_BUNDLED_QT and provide your own.")
endif()
if (DEFINED QT_VER)
download_bundled_external("qt/" ${QT_VER} QT_PREFIX)
endif()
set(QT_PREFIX_HINT HINTS "${QT_PREFIX}")
else()
# Passing an empty HINTS seems to cause default system paths to get ignored in CMake 2.8 so
# make sure to not pass anything if we don't have one.
set(QT_PREFIX_HINT)
endif()
find_package(Qt5 REQUIRED COMPONENTS Widgets Multimedia ${QT_PREFIX_HINT})
if (ENABLE_QT_TRANSLATION)
find_package(Qt5 REQUIRED COMPONENTS LinguistTools)
find_package(Qt5 REQUIRED COMPONENTS LinguistTools ${QT_PREFIX_HINT})
endif()
endif()

View File

@ -36,13 +36,8 @@
"libyuv",
"lodepng",
"glslang",
"soundtouch",
"robin-map",
"xbyak",
"zstd",
"sdl2",
"sdl2-image",
"qt5-base",
"qt5-multimedia"
"sdl2"
]
}