Browse Source

[cmake] ffmpeg: use static on MSVC

Signed-off-by: crueter <crueter@eden-emu.dev>
pull/2946/head
crueter 4 months ago
parent
commit
914f762f02
  1. 10
      CMakeModules/CopyYuzuFFmpegDeps.cmake
  2. 8
      CMakeModules/CopyYuzuSDLDeps.cmake
  3. 3
      externals/ffmpeg/CMakeLists.txt
  4. 7
      src/yuzu/CMakeLists.txt
  5. 5
      src/yuzu_cmd/CMakeLists.txt

10
CMakeModules/CopyYuzuFFmpegDeps.cmake

@ -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 "$<TARGET_FILE_DIR:${target_dir}>/")
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)

8
CMakeModules/CopyYuzuSDLDeps.cmake

@ -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 "$<TARGET_FILE_DIR:${target_dir}>/")
windows_copy_files(${target_dir} ${SDL2_DLL_DIR} ${DLL_DEST} SDL2.dll)
endfunction(copy_yuzu_SDL_deps)

3
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)

7
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()

5
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)
Loading…
Cancel
Save