diff options
| author | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-29 20:44:40 -0400 |
|---|---|---|
| committer | Takoroka <137927095+Takoroka@users.noreply.github.com> | 2026-10-29 20:49:49 -0400 |
| commit | 2203754e5d054ad2e2d68dd15a3aa3bf0db2479b (patch) | |
| tree | cb59476df72baf899195b07f0763c6acf8c020be /src | |
| parent | a08fc6a6a990fa4c5b51b6309e99ba4dcddafe97 (diff) | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/CMakeLists.txt | 17 |
1 files changed, 15 insertions, 2 deletions
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 "$<TARGET_FILE_DIR:yuzu>") - 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 "$<TARGET_FILE:Qt6::windeployqt>") + 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 "$<TARGET_FILE_DIR:yuzu>") + add_custom_command(TARGET yuzu POST_BUILD COMMAND ${WINDEPLOYQT_EXECUTABLE} "$<TARGET_FILE:yuzu>" --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) |
