[cmake] ffmpeg: use CPM and source archive (#155)

Cherry-picked from refactor/cpm. Dramatically reduces download time

Signed-off-by: crueter <crueter@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/155
This commit is contained in:
crueter
2025-07-30 07:06:50 +02:00
parent dee960ccd9
commit 43f450499c
6 changed files with 13 additions and 9 deletions

3
.gitmodules vendored
View File

@@ -19,9 +19,6 @@
[submodule "cpp-httplib"]
path = externals/cpp-httplib
url = https://github.com/yhirose/cpp-httplib.git
[submodule "ffmpeg"]
path = externals/ffmpeg/ffmpeg
url = https://github.com/FFmpeg/FFmpeg.git
[submodule "vcpkg"]
path = externals/vcpkg
url = https://github.com/microsoft/vcpkg.git

View File

@@ -491,6 +491,8 @@ set(FFmpeg_COMPONENTS
avutil
swscale)
set(CPM_SOURCE_CACHE ${CMAKE_SOURCE_DIR}/.cache/cpm)
add_subdirectory(externals)
if (ENABLE_QT)

View File

@@ -83,8 +83,6 @@ if (YUZU_USE_EXTERNAL_SDL2)
set(SDL_FILE ON)
endif()
set(CPM_SOURCE_CACHE ${CMAKE_SOURCE_DIR}/.cache/cpm)
include(CPM)
set(CPM_USE_LOCAL_PACKAGES OFF)

View File

@@ -19,8 +19,17 @@ if (NOT WIN32 AND NOT ANDROID)
message(FATAL_ERROR "Required program `autoconf` not found.")
endif()
set(FFmpeg_PREFIX ${PROJECT_SOURCE_DIR}/externals/ffmpeg/ffmpeg)
set(FFmpeg_BUILD_DIR ${PROJECT_BINARY_DIR}/externals/ffmpeg-build)
include(CPM)
set(CPM_USE_LOCAL_PACKAGES OFF)
CPMAddPackage(
NAME ffmpeg
URL "https://github.com/ffmpeg/ffmpeg/archive/9c1294eadd.zip"
URL_HASH SHA512=2076e4cb843787c44718c70c4452517273dbc963ef98442f343762ade6c7b9f78555ae9b50a7c628844a15d8cb5e866c04e2f1acfb77093cea4fbc9edf3ad21a
)
set(FFmpeg_PREFIX ${ffmpeg_SOURCE_DIR})
set(FFmpeg_BUILD_DIR ${ffmpeg_BINARY_DIR})
set(FFmpeg_MAKEFILE ${FFmpeg_BUILD_DIR}/Makefile)
make_directory(${FFmpeg_BUILD_DIR})

Submodule externals/ffmpeg/ffmpeg deleted from 9c1294eadd

View File

@@ -6,7 +6,6 @@ set(BUILD_SHARED_LIBS OFF)
# QuaZip
include(CPM)
set(CPM_SOURCE_CACHE ${CMAKE_SOURCE_DIR}/.cache/cpm)
set(CPM_USE_LOCAL_PACKAGES ON)
CPMAddPackage(