From c44ab0f8f6dc1142e9190979be259a0d75149e9f Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 9 Feb 2021 22:17:22 -0500 Subject: [PATCH] cmake: Update FFmpeg to 4.3.1 Download FFmpeg package version 4.3.1. Uses a file defined within the package to determine with DLLs to copy. Also corrects a submodule name. --- .gitmodules | 2 +- CMakeLists.txt | 2 +- CMakeModules/CopyYuzuFFmpegDeps.cmake | 8 ++------ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.gitmodules b/.gitmodules index 4962f7bfd2..93ba9b930d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -37,6 +37,6 @@ [submodule "opus"] path = externals/opus/opus url = https://github.com/xiph/opus.git -[submodule "externals/ffmpeg"] +[submodule "ffmpeg"] path = externals/ffmpeg url = https://git.ffmpeg.org/ffmpeg.git diff --git a/CMakeLists.txt b/CMakeLists.txt index c451231393..ac7c3ce90b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -504,7 +504,7 @@ if (YUZU_USE_BUNDLED_FFMPEG) endif() else() # WIN32 # Use yuzu FFmpeg binaries - set(FFmpeg_EXT_NAME "ffmpeg-4.2.1") + set(FFmpeg_EXT_NAME "ffmpeg-4.3.1") set(FFmpeg_PATH "${CMAKE_BINARY_DIR}/externals/${FFmpeg_EXT_NAME}") download_bundled_external("ffmpeg/" ${FFmpeg_EXT_NAME} "") set(FFmpeg_FOUND YES) diff --git a/CMakeModules/CopyYuzuFFmpegDeps.cmake b/CMakeModules/CopyYuzuFFmpegDeps.cmake index b7162cf17b..26384e8b8a 100644 --- a/CMakeModules/CopyYuzuFFmpegDeps.cmake +++ b/CMakeModules/CopyYuzuFFmpegDeps.cmake @@ -1,10 +1,6 @@ function(copy_yuzu_FFmpeg_deps target_dir) include(WindowsCopyFiles) set(DLL_DEST "${CMAKE_BINARY_DIR}/bin/$/") - windows_copy_files(${target_dir} ${FFmpeg_DLL_DIR} ${DLL_DEST} - avcodec-58.dll - avutil-56.dll - swresample-3.dll - swscale-5.dll - ) + file(READ "${FFmpeg_PATH}/requirements.txt" FFmpeg_REQUIRED_DLLS) + windows_copy_files(${target_dir} ${FFmpeg_DLL_DIR} ${DLL_DEST} ${FFmpeg_REQUIRED_DLLS}) endfunction(copy_yuzu_FFmpeg_deps)