# SPDX-FileCopyrightText: 2024 kleidis function(copy_yuzu_Qt6_deps target_dir) include(WindowsCopyFiles) if (MSVC) set(DLL_DEST "$/") set(Qt6_DLL_DIR "${Qt6_DIR}/../../../bin") else() set(DLL_DEST "${CMAKE_BINARY_DIR}/bin/") set(Qt6_DLL_DIR "${Qt6_DIR}/../../../lib/") endif() set(Qt6_PLATFORMS_DIR "${Qt6_DIR}/../../../plugins/platforms/") set(Qt6_STYLES_DIR "${Qt6_DIR}/../../../plugins/styles/") set(Qt6_IMAGEFORMATS_DIR "${Qt6_DIR}/../../../plugins/imageformats/") set(Qt6_RESOURCES_DIR "${Qt6_DIR}/../../../resources/") set(PLATFORMS ${DLL_DEST}plugins/platforms/) set(STYLES ${DLL_DEST}plugins/styles/) set(IMAGEFORMATS ${DLL_DEST}plugins/imageformats/) set(RESOURCES ${DLL_DEST}resources/) if (MSVC) windows_copy_files(${target_dir} ${Qt6_DLL_DIR} ${DLL_DEST} Qt6Core$<$:d>.* Qt6Core5Compat$<$:d>.* Qt6Gui$<$:d>.* Qt6Widgets$<$:d>.* Qt6Network$<$:d>.* ) if (YUZU_USE_QT_MULTIMEDIA) windows_copy_files(${target_dir} ${Qt6_DLL_DIR} ${DLL_DEST} Qt6Multimedia$<$:d>.* ) endif() if (YUZU_USE_QT_WEB_ENGINE) windows_copy_files(${target_dir} ${Qt6_DLL_DIR} ${DLL_DEST} Qt6OpenGL$<$:d>.* Qt6Positioning$<$:d>.* Qt6PrintSupport$<$:d>.* Qt6Qml$<$:d>.* Qt6QmlMeta$<$:d>.* Qt6QmlModels$<$:d>.* Qt6QmlWorkerScript$<$:d>.* Qt6Quick$<$:d>.* Qt6QuickWidgets$<$:d>.* Qt6WebChannel$<$:d>.* Qt6WebEngineCore$<$:d>.* Qt6WebEngineWidgets$<$:d>.* QtWebEngineProcess$<$:d>.* ) windows_copy_files(${target_dir} ${Qt6_RESOURCES_DIR} ${RESOURCES} icudtl.dat qtwebengine_devtools_resources.pak qtwebengine_resources.pak qtwebengine_resources_100p.pak qtwebengine_resources_200p.pak v8_context_snapshot.bin ) endif() windows_copy_files(yuzu ${Qt6_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$:d>.*) windows_copy_files(yuzu ${Qt6_STYLES_DIR} ${STYLES} qmodernwindowsstyle$<$:d>.*) windows_copy_files(yuzu ${Qt6_IMAGEFORMATS_DIR} ${IMAGEFORMATS} qjpeg$<$:d>.* qgif$<$:d>.* ) else() # Update for non-MSVC platforms if needed endif() # Fixes dark mode being forced automatically even when light theme is set in app settings. file(WRITE "${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/qt.conf" "[Platforms]\nWindowsArguments = darkmode=0") endfunction(copy_yuzu_Qt6_deps)