mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-10 05:28:56 +02:00
[cmake] ffmpeg: use static on MSVC (#2946)
Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2946
This commit is contained in:
parent
ac2287f261
commit
82a476d458
12 changed files with 75 additions and 75 deletions
|
|
@ -586,15 +586,22 @@ function(AddCIPackage)
|
||||||
set(ARTIFACT_REPO ${PKG_ARGS_REPO})
|
set(ARTIFACT_REPO ${PKG_ARGS_REPO})
|
||||||
set(ARTIFACT_PACKAGE ${PKG_ARGS_PACKAGE})
|
set(ARTIFACT_PACKAGE ${PKG_ARGS_PACKAGE})
|
||||||
|
|
||||||
# TODO: separate MinGW packages if applicable
|
if ((MSVC AND ARCHITECTURE_x86_64) AND NOT "windows-amd64" IN_LIST DISABLED_PLATFORMS)
|
||||||
if ((WIN32 AND ARCHITECTURE_x86_64) AND NOT "windows-amd64" IN_LIST DISABLED_PLATFORMS)
|
|
||||||
add_ci_package(windows-amd64)
|
add_ci_package(windows-amd64)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if ((WIN32 AND ARCHITECTURE_arm64) AND NOT "windows-arm64" IN_LIST DISABLED_PLATFORMS)
|
if ((MSVC AND ARCHITECTURE_arm64) AND NOT "windows-arm64" IN_LIST DISABLED_PLATFORMS)
|
||||||
add_ci_package(windows-arm64)
|
add_ci_package(windows-arm64)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if ((MINGW AND ARCHITECTURE_x86_64) AND NOT "mingw-amd64" IN_LIST DISABLED_PLATFORMS)
|
||||||
|
add_ci_package(mingw-amd64)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if ((MINGW AND ARCHITECTURE_arm64) AND NOT "mingw-arm64" IN_LIST DISABLED_PLATFORMS)
|
||||||
|
add_ci_package(mingw-arm64)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (ANDROID AND NOT "android" IN_LIST DISABLED_PLATFORMS)
|
if (ANDROID AND NOT "android" IN_LIST DISABLED_PLATFORMS)
|
||||||
add_ci_package(android)
|
add_ci_package(android)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -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)
|
|
||||||
|
|
@ -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)
|
|
||||||
|
|
@ -7,7 +7,9 @@
|
||||||
"version": "3.6.0",
|
"version": "3.6.0",
|
||||||
"min_version": "1.1.1",
|
"min_version": "1.1.1",
|
||||||
"disabled_platforms": [
|
"disabled_platforms": [
|
||||||
"macos-universal"
|
"macos-universal",
|
||||||
|
"mingw-amd64",
|
||||||
|
"mingw-arm64"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"boost": {
|
"boost": {
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@
|
||||||
- `DISABLED_PLATFORMS`: List of platforms that lack artifacts for this package. Options:
|
- `DISABLED_PLATFORMS`: List of platforms that lack artifacts for this package. Options:
|
||||||
* `windows-amd64`
|
* `windows-amd64`
|
||||||
* `windows-arm64`
|
* `windows-arm64`
|
||||||
|
* `mingw-amd64`
|
||||||
|
* `mingw-arm64`
|
||||||
* `android`
|
* `android`
|
||||||
* `solaris-amd64`
|
* `solaris-amd64`
|
||||||
* `freebsd-amd64`
|
* `freebsd-amd64`
|
||||||
|
|
|
||||||
6
externals/cpmfile.json
vendored
6
externals/cpmfile.json
vendored
|
|
@ -23,7 +23,11 @@
|
||||||
"package": "sirit",
|
"package": "sirit",
|
||||||
"name": "sirit",
|
"name": "sirit",
|
||||||
"repo": "eden-emulator/sirit",
|
"repo": "eden-emulator/sirit",
|
||||||
"version": "1.0.2"
|
"version": "1.0.2",
|
||||||
|
"disabled_platforms": [
|
||||||
|
"mingw-amd64",
|
||||||
|
"mingw-arm64"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"httplib": {
|
"httplib": {
|
||||||
"repo": "yhirose/cpp-httplib",
|
"repo": "yhirose/cpp-httplib",
|
||||||
|
|
|
||||||
3
externals/ffmpeg/CMakeLists.txt
vendored
3
externals/ffmpeg/CMakeLists.txt
vendored
|
|
@ -107,9 +107,10 @@ endif()
|
||||||
|
|
||||||
if (YUZU_USE_BUNDLED_FFMPEG)
|
if (YUZU_USE_BUNDLED_FFMPEG)
|
||||||
# MSVC conflicts with ksuser otherwise
|
# 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)
|
# Android needs some deps to be compiled with PIC (TODO)
|
||||||
# TODO(crueter) fix
|
# TODO(crueter) fix
|
||||||
if (MSVC OR ANDROID)
|
if (ANDROID)
|
||||||
set(BUILD_SHARED_LIBS ON)
|
set(BUILD_SHARED_LIBS ON)
|
||||||
else()
|
else()
|
||||||
set(BUILD_SHARED_LIBS OFF)
|
set(BUILD_SHARED_LIBS OFF)
|
||||||
|
|
|
||||||
1
externals/ffmpeg/cpmfile.json
vendored
1
externals/ffmpeg/cpmfile.json
vendored
|
|
@ -15,6 +15,7 @@
|
||||||
"disabled_platforms": [
|
"disabled_platforms": [
|
||||||
"freebsd-amd64",
|
"freebsd-amd64",
|
||||||
"solaris-amd64",
|
"solaris-amd64",
|
||||||
|
"openbsd-amd64",
|
||||||
"macos-universal"
|
"macos-universal"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -437,13 +437,6 @@ if (ENABLE_SDL2)
|
||||||
target_compile_definitions(yuzu PRIVATE HAVE_SDL2)
|
target_compile_definitions(yuzu PRIVATE HAVE_SDL2)
|
||||||
endif()
|
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)
|
if (ARCHITECTURE_x86_64 OR ARCHITECTURE_arm64)
|
||||||
target_link_libraries(yuzu PRIVATE dynarmic::dynarmic)
|
target_link_libraries(yuzu PRIVATE dynarmic::dynarmic)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -55,9 +55,4 @@ if(WIN32)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (MSVC)
|
|
||||||
include(CopyYuzuSDLDeps)
|
|
||||||
copy_yuzu_SDL_deps(yuzu-cmd)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
create_target_directory_groups(yuzu-cmd)
|
create_target_directory_groups(yuzu-cmd)
|
||||||
|
|
|
||||||
|
|
@ -37,11 +37,20 @@ EOF
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
(-uf|--force) UPDATE=true; FORCE=true; continue ;;
|
-f | --force)
|
||||||
(-u|--update) UPDATE=true; continue ;;
|
UPDATE=true
|
||||||
(-h) usage ;;
|
FORCE=true
|
||||||
("$0") break ;;
|
shift
|
||||||
("") break ;;
|
continue
|
||||||
|
;;
|
||||||
|
-u | --update)
|
||||||
|
UPDATE=true
|
||||||
|
shift
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
-h) usage ;;
|
||||||
|
"$0") break ;;
|
||||||
|
"") break ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
PACKAGE="$1"
|
PACKAGE="$1"
|
||||||
|
|
@ -52,68 +61,72 @@ while true; do
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
. tools/cpm/package.sh
|
. tools/cpm/package.sh
|
||||||
|
|
||||||
SKIP=$(value "skip_updates")
|
SKIP=$(value "skip_updates")
|
||||||
|
|
||||||
[ "$SKIP" = "true" ] && continue
|
[ "$SKIP" = "true" ] && continue
|
||||||
|
|
||||||
[ "$REPO" = null ] && continue
|
[ "$REPO" = null ] && continue
|
||||||
[ "$GIT_HOST" != "github.com" ] && continue # TODO
|
[ "$GIT_HOST" != "github.com" ] && continue # TODO
|
||||||
# shellcheck disable=SC2153
|
# shellcheck disable=SC2153
|
||||||
[ "$TAG" = null ] && continue
|
[ "$TAG" = null ] && continue
|
||||||
|
|
||||||
echo "-- Package $PACKAGE"
|
echo "-- Package $PACKAGE"
|
||||||
|
|
||||||
# TODO(crueter): Support for Forgejo updates w/ forgejo_token
|
# TODO(crueter): Support for Forgejo updates w/ forgejo_token
|
||||||
# Use gh-cli to avoid ratelimits lmao
|
# Use gh-cli to avoid ratelimits lmao
|
||||||
TAGS=$(gh api --method GET "/repos/$REPO/tags")
|
TAGS=$(gh api --method GET "/repos/$REPO/tags")
|
||||||
|
|
||||||
# filter out some commonly known annoyances
|
# filter out some commonly known annoyances
|
||||||
# TODO add more
|
# TODO add more
|
||||||
|
|
||||||
filter vulkan-sdk # vulkan
|
filter vulkan-sdk # vulkan
|
||||||
filter yotta # mbedtls
|
filter yotta # mbedtls
|
||||||
|
|
||||||
# ignore betas/alphas (remove if needed)
|
# ignore betas/alphas (remove if needed)
|
||||||
filter alpha
|
filter alpha
|
||||||
filter beta
|
filter beta
|
||||||
filter rc
|
filter rc
|
||||||
|
|
||||||
# Add package-specific overrides here, e.g. here for fmt:
|
# Add package-specific overrides here, e.g. here for fmt:
|
||||||
[ "$PACKAGE" = fmt ] && filter v0.11
|
[ "$PACKAGE" = fmt ] && filter v0.11
|
||||||
|
|
||||||
LATEST=$(echo "$TAGS" | jq -r '.[0].name')
|
LATEST=$(echo "$TAGS" | jq -r '.[0].name')
|
||||||
|
|
||||||
[ "$LATEST" = "$TAG" ] && [ "$FORCE" != "true" ] && echo "-- * Up-to-date" && continue
|
[ "$LATEST" = "$TAG" ] && [ "$FORCE" != "true" ] && echo "-- * Up-to-date" && continue
|
||||||
|
|
||||||
RETURN=1
|
RETURN=1
|
||||||
|
|
||||||
if [ "$HAS_REPLACE" = "true" ]; then
|
if [ "$HAS_REPLACE" = "true" ]; then
|
||||||
# this just extracts the tag prefix
|
# this just extracts the tag prefix
|
||||||
VERSION_PREFIX=$(echo "$ORIGINAL_TAG" | cut -d"%" -f1)
|
VERSION_PREFIX=$(echo "$ORIGINAL_TAG" | cut -d"%" -f1)
|
||||||
|
|
||||||
# then we strip out the prefix from the new tag, and make that our new git_version
|
# then we strip out the prefix from the new tag, and make that our new git_version
|
||||||
NEW_GIT_VERSION=$(echo "$LATEST" | sed "s/$VERSION_PREFIX//g")
|
if [ -z "$VERSION_PREFIX" ]; then
|
||||||
fi
|
NEW_GIT_VERSION="$LATEST"
|
||||||
|
else
|
||||||
|
NEW_GIT_VERSION=$(echo "$LATEST" | sed "s/$VERSION_PREFIX//g")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo "-- * Version $LATEST available, current is $TAG"
|
echo "-- * Version $LATEST available, current is $TAG"
|
||||||
|
|
||||||
HASH=$(tools/cpm/hash.sh "$REPO" "$LATEST")
|
HASH=$(tools/cpm/hash.sh "$REPO" "$LATEST")
|
||||||
|
|
||||||
echo "-- * New hash: $HASH"
|
echo "-- * New hash: $HASH"
|
||||||
|
|
||||||
if [ "$UPDATE" = "true" ]; then
|
if [ "$UPDATE" = "true" ]; then
|
||||||
RETURN=0
|
RETURN=0
|
||||||
|
|
||||||
if [ "$HAS_REPLACE" = "true" ]; then
|
if [ "$HAS_REPLACE" = "true" ]; then
|
||||||
NEW_JSON=$(echo "$JSON" | jq ".hash = \"$HASH\" | .git_version = \"$NEW_GIT_VERSION\"")
|
NEW_JSON=$(echo "$JSON" | jq ".hash = \"$HASH\" | .git_version = \"$NEW_GIT_VERSION\"")
|
||||||
else
|
else
|
||||||
NEW_JSON=$(echo "$JSON" | jq ".hash = \"$HASH\" | .tag = \"$LATEST\"")
|
NEW_JSON=$(echo "$JSON" | jq ".hash = \"$HASH\" | .tag = \"$LATEST\"")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export NEW_JSON
|
export NEW_JSON
|
||||||
|
|
||||||
tools/cpm/replace.sh
|
tools/cpm/replace.sh
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
exit $RETURN
|
exit $RETURN
|
||||||
|
|
@ -65,7 +65,7 @@ ci_package() {
|
||||||
|
|
||||||
echo "-- CI package $PACKAGE_NAME"
|
echo "-- CI package $PACKAGE_NAME"
|
||||||
|
|
||||||
for platform in windows-amd64 windows-arm64 android solaris-amd64 freebsd-amd64 linux-amd64 linux-aarch64 macos-universal; do
|
for platform in windows-amd64 windows-arm64 mingw-amd64 mingw-arm64 android solaris-amd64 freebsd-amd64 openbsd-amd64 linux-amd64 linux-aarch64 macos-universal; do
|
||||||
echo "-- * platform $platform"
|
echo "-- * platform $platform"
|
||||||
|
|
||||||
case $DISABLED in
|
case $DISABLED in
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue