From 2203754e5d054ad2e2d68dd15a3aa3bf0db2479b Mon Sep 17 00:00:00 2001 From: Takoroka <137927095+Takoroka@users.noreply.github.com> Date: Thu, 29 Oct 2026 20:44:40 -0400 Subject: cmake: find windeployqt for Windows builds with an installed Qt WINDEPLOYQT_EXECUTABLE was never set, so the post-build step of the Qt frontend ran the emulator itself with windeployqt's arguments and failed every Windows build against an installed Qt, like the release workflow. Use Qt's own windeployqt target, or look next to Qt's binaries, and name the executable through the target instead of a hard-coded file name. --- src/yuzu/CMakeLists.txt | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 62c2a2bd45..e6906a4ef0 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -432,8 +432,21 @@ if(UNIX AND NOT APPLE) endif() if (WIN32 AND NOT YUZU_USE_BUNDLED_QT) - set(YUZU_EXE_DIR "$") - add_custom_command(TARGET yuzu POST_BUILD COMMAND ${WINDEPLOYQT_EXECUTABLE} "${YUZU_EXE_DIR}/eglantine.exe" --dir "${YUZU_EXE_DIR}" --libdir "${YUZU_EXE_DIR}" --plugindir "${YUZU_EXE_DIR}/plugins" --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler --no-translations --verbose 0) + # Copy the Qt DLLs and plugins next to the executable. WINDEPLOYQT_EXECUTABLE was never set, so + # this step ran the emulator itself with windeployqt's arguments and failed every build that + # uses an installed Qt (the Windows release workflow). + if (TARGET Qt6::windeployqt) + set(WINDEPLOYQT_EXECUTABLE "$") + else() + find_program(WINDEPLOYQT_EXECUTABLE NAMES windeployqt6 windeployqt + HINTS "${QT_HOST_PATH}/bin" "${QT_TARGET_PATH}/bin") + endif() + if (WINDEPLOYQT_EXECUTABLE) + set(YUZU_EXE_DIR "$") + add_custom_command(TARGET yuzu POST_BUILD COMMAND ${WINDEPLOYQT_EXECUTABLE} "$" --dir "${YUZU_EXE_DIR}" --libdir "${YUZU_EXE_DIR}" --plugindir "${YUZU_EXE_DIR}/plugins" --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler --no-translations --verbose 0) + else() + message(WARNING "windeployqt not found: copy the Qt DLLs next to the executable yourself") + endif() endif() if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) -- cgit v1.2.3