From 914f762f02cd4079d35007ef2df17f4accd864a1 Mon Sep 17 00:00:00 2001 From: crueter Date: Mon, 3 Nov 2025 10:50:00 -0800 Subject: [PATCH] [cmake] ffmpeg: use static on MSVC Signed-off-by: crueter --- CMakeModules/CopyYuzuFFmpegDeps.cmake | 10 ---------- CMakeModules/CopyYuzuSDLDeps.cmake | 8 -------- externals/ffmpeg/CMakeLists.txt | 3 ++- src/yuzu/CMakeLists.txt | 7 ------- src/yuzu_cmd/CMakeLists.txt | 5 ----- 5 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 CMakeModules/CopyYuzuFFmpegDeps.cmake delete mode 100644 CMakeModules/CopyYuzuSDLDeps.cmake diff --git a/CMakeModules/CopyYuzuFFmpegDeps.cmake b/CMakeModules/CopyYuzuFFmpegDeps.cmake deleted file mode 100644 index e50696cc02..0000000000 --- a/CMakeModules/CopyYuzuFFmpegDeps.cmake +++ /dev/null @@ -1,10 +0,0 @@ -# SPDX-FileCopyrightText: 2020 yuzu Emulator Project -# SPDX-License-Identifier: GPL-2.0-or-later - -function(copy_yuzu_FFmpeg_deps target_dir) - include(WindowsCopyFiles) - set(DLL_DEST "$/") - file(READ "${FFmpeg_PATH}/requirements.txt" FFmpeg_REQUIRED_DLLS) - string(STRIP "${FFmpeg_REQUIRED_DLLS}" FFmpeg_REQUIRED_DLLS) - windows_copy_files(${target_dir} ${FFmpeg_LIBRARY_DIR} ${DLL_DEST} ${FFmpeg_REQUIRED_DLLS}) -endfunction(copy_yuzu_FFmpeg_deps) diff --git a/CMakeModules/CopyYuzuSDLDeps.cmake b/CMakeModules/CopyYuzuSDLDeps.cmake deleted file mode 100644 index 464eed5e9c..0000000000 --- a/CMakeModules/CopyYuzuSDLDeps.cmake +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-FileCopyrightText: 2016 Citra Emulator Project -# SPDX-License-Identifier: GPL-2.0-or-later - -function(copy_yuzu_SDL_deps target_dir) - include(WindowsCopyFiles) - set(DLL_DEST "$/") - windows_copy_files(${target_dir} ${SDL2_DLL_DIR} ${DLL_DEST} SDL2.dll) -endfunction(copy_yuzu_SDL_deps) diff --git a/externals/ffmpeg/CMakeLists.txt b/externals/ffmpeg/CMakeLists.txt index 59397f6acb..995b25a2c7 100644 --- a/externals/ffmpeg/CMakeLists.txt +++ b/externals/ffmpeg/CMakeLists.txt @@ -107,9 +107,10 @@ endif() if (YUZU_USE_BUNDLED_FFMPEG) # MSVC conflicts with ksuser otherwise + # MinGW has the funny quirk of requiring avutil after avcodec # Android needs some deps to be compiled with PIC (TODO) # TODO(crueter) fix - if (MSVC OR ANDROID) + if (ANDROID) set(BUILD_SHARED_LIBS ON) else() set(BUILD_SHARED_LIBS OFF) diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index d6082dd00b..6100814cd6 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -437,13 +437,6 @@ if (ENABLE_SDL2) target_compile_definitions(yuzu PRIVATE HAVE_SDL2) endif() -if (MSVC) - include(CopyYuzuSDLDeps) - include(CopyYuzuFFmpegDeps) - copy_yuzu_SDL_deps(yuzu) - copy_yuzu_FFmpeg_deps(yuzu) -endif() - if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64) target_link_libraries(yuzu PRIVATE dynarmic::dynarmic) endif() diff --git a/src/yuzu_cmd/CMakeLists.txt b/src/yuzu_cmd/CMakeLists.txt index 211b3141c2..b26628e074 100644 --- a/src/yuzu_cmd/CMakeLists.txt +++ b/src/yuzu_cmd/CMakeLists.txt @@ -55,9 +55,4 @@ if(WIN32) endif() endif() -if (MSVC) - include(CopyYuzuSDLDeps) - copy_yuzu_SDL_deps(yuzu-cmd) -endif() - create_target_directory_groups(yuzu-cmd)