From d0ce0d3bba6d1ad8fada09104f86d79cab543d39 Mon Sep 17 00:00:00 2001 From: crueter Date: Tue, 8 Jul 2025 17:33:18 -0400 Subject: [PATCH] [cmake] enable Qt mirror and shorten qt modules Signed-off-by: crueter --- CMakeLists.txt | 2 ++ CMakeModules/DownloadExternals.cmake | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4836ef811e..0cb8b9b14b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,6 +55,8 @@ option(YUZU_USE_QT_MULTIMEDIA "Use QtMultimedia for Camera" OFF) option(YUZU_USE_QT_WEB_ENGINE "Use QtWebEngine for web applet implementation" OFF) +CMAKE_DEPENDENT_OPTION(YUZU_QT_MIRROR "What mirror to use for when downloading bundled Qt" "" "YUZU_USE_BUNDLED_QT" "") + option(ENABLE_CUBEB "Enables the cubeb audio backend" ON) option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence" OFF) diff --git a/CMakeModules/DownloadExternals.cmake b/CMakeModules/DownloadExternals.cmake index a82d1d72a3..6ab7cd82f6 100644 --- a/CMakeModules/DownloadExternals.cmake +++ b/CMakeModules/DownloadExternals.cmake @@ -133,7 +133,23 @@ function(download_qt_configuration prefix_out target host type arch arch_path ba set(install_args ${install_args} install-tool --outputdir ${base_path} ${host} desktop ${target}) else() set(prefix "${base_path}/${target}/${arch_path}") - set(install_args ${install_args} install-qt --outputdir ${base_path} ${host} ${type} ${target} ${arch} -m qt3d qt5compat qtactiveqt qtcharts qtconnectivity qtdatavis3d qtgraphs qtgrpc qthttpserver qtimageformats qtlanguageserver qtlocation qtlottie qtmultimedia qtnetworkauth qtpdf qtpositioning qtquick3d qtquick3dphysics qtquickeffectmaker qtquicktimeline qtremoteobjects qtscxml qtsensors qtserialbus qtserialport qtshadertools qtspeech qtvirtualkeyboard qtwebchannel qtwebengine qtwebsockets qtwebview) + set(install_args ${install_args} install-qt --outputdir ${base_path} ${host} ${type} ${target} ${arch}) + + if (YUZU_USE_QT_MULTIMEDIA OR YUZU_USE_QT_WEB_ENGINE) + set(install_args ${install_args} -m) + endif() + + if (YUZU_USE_QT_MULTIMEDIA) + set(install_args ${install_args} qtmultimedia) + endif() + + if (YUZU_USE_QT_WEB_ENGINE) + set(install_args ${install_args} qtpositioning qtwebchannel qtwebengine) + endif() + + if (NOT "${YUZU_QT_MIRROR}" STREQUAL "") + set(install_args ${install_args} -b ${YUZU_QT_MIRROR}) + endif() endif() if (NOT EXISTS "${prefix}")