build(deps): use a single submodule for ffmpeg (#1952)

This commit is contained in:
ReenigneArcher
2023-12-30 17:36:36 -05:00
committed by GitHub
parent 081936879b
commit 7640c504fa
11 changed files with 13 additions and 59 deletions

28
.gitmodules vendored
View File

@@ -22,26 +22,6 @@
path = third-party/TPCircularBuffer
url = https://github.com/michaeltyson/TPCircularBuffer
branch = master
[submodule "third-party/ffmpeg-windows-x86_64"]
path = third-party/ffmpeg-windows-x86_64
url = https://github.com/LizardByte/build-deps
branch = ffmpeg-windows-x86_64
[submodule "third-party/ffmpeg-macos-x86_64"]
path = third-party/ffmpeg-macos-x86_64
url = https://github.com/LizardByte/build-deps
branch = ffmpeg-macos-x86_64
[submodule "third-party/ffmpeg-linux-x86_64"]
path = third-party/ffmpeg-linux-x86_64
url = https://github.com/LizardByte/build-deps
branch = ffmpeg-linux-x86_64
[submodule "third-party/ffmpeg-linux-aarch64"]
path = third-party/ffmpeg-linux-aarch64
url = https://github.com/LizardByte/build-deps
branch = ffmpeg-linux-aarch64
[submodule "third-party/ffmpeg-macos-aarch64"]
path = third-party/ffmpeg-macos-aarch64
url = https://github.com/LizardByte/build-deps
branch = ffmpeg-macos-aarch64
[submodule "third-party/nanors"]
path = third-party/nanors
url = https://github.com/sleepybishop/nanors.git
@@ -54,10 +34,6 @@
path = third-party/nvapi-open-source-sdk
url = https://github.com/LizardByte/nvapi-open-source-sdk
branch = sdk
[submodule "third-party/ffmpeg-linux-powerpc64le"]
path = third-party/ffmpeg-linux-powerpc64le
url = https://github.com/LizardByte/build-deps
branch = ffmpeg-linux-powerpc64le
[submodule "third-party/wayland-protocols"]
path = third-party/wayland-protocols
url = https://gitlab.freedesktop.org/wayland/wayland-protocols
@@ -66,3 +42,7 @@
path = third-party/wlr-protocols
url = https://gitlab.freedesktop.org/wlroots/wlr-protocols
branch = master
[submodule "third-party/build-deps"]
path = third-party/build-deps
url = https://github.com/LizardByte/build-deps.git
branch = dist

View File

@@ -23,12 +23,12 @@ if(WIN32)
message(FATAL_ERROR "Unsupported system processor:" ${CMAKE_SYSTEM_PROCESSOR})
endif()
set(FFMPEG_PLATFORM_LIBRARIES mfplat ole32 strmiids mfuuid vpl)
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-windows-x86_64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/build-deps/ffmpeg/windows-x86_64")
elseif(APPLE)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-macos-x86_64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/build-deps/ffmpeg/macos-x86_64")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-macos-aarch64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/build-deps/ffmpeg/macos-aarch64")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "powerpc")
message(FATAL_ERROR "PowerPC is not supported on macOS")
else()
@@ -38,13 +38,13 @@ elseif(UNIX)
set(FFMPEG_PLATFORM_LIBRARIES va va-drm va-x11 vdpau X11)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
list(APPEND FFMPEG_PLATFORM_LIBRARIES mfx)
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-x86_64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/build-deps/ffmpeg/linux-x86_64")
set(CPACK_DEB_PLATFORM_PACKAGE_DEPENDS "libmfx1,")
set(CPACK_RPM_PLATFORM_PACKAGE_REQUIRES "intel-mediasdk >= 22.3.0,")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-aarch64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/build-deps/ffmpeg/linux-aarch64")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-powerpc64le")
set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/build-deps/ffmpeg/linux-powerpc64le")
else()
message(FATAL_ERROR "Unsupported system processor:" ${CMAKE_SYSTEM_PROCESSOR})
endif()

View File

@@ -2355,7 +2355,7 @@ SEARCH_INCLUDES = YES
# RECURSIVE has no effect here.
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
INCLUDE_PATH = ../third-party/ffmpeg-linux-x86_64/include/
INCLUDE_PATH = ../third-party/build-deps/ffmpeg/linux-x86_64/include/
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
# patterns (like *.h and *.hpp) to filter out the header-files in the

View File

@@ -45,28 +45,7 @@ sha256sums=('SKIP')
prepare() {
cd "$pkgname"
# Skip submodules that we don't want
if [[ $CARCH == "x86_64" ]]; then
git -c submodule."ffmpeg-macos-x86_64".update=none \
-c submodule."ffmpeg-windows-x86_64".update=none \
-c submodule."ffmpeg-linux-aarch64".update=none \
-c submodule."ffmpeg-macos-aarch64".update=none \
submodule update --recursive --init
elif [[ $CARCH == "aarch64" ]]; then
git -c submodule."ffmpeg-macos-x86_64".update=none \
-c submodule."ffmpeg-windows-x86_64".update=none \
-c submodule."ffmpeg-linux-x86_64".update=none \
-c submodule."ffmpeg-macos-aarch64".update=none \
submodule update --recursive --init
# It's unlikely that someone could get this far on a system with an incorrect arch, but we should handle it anyway
# Pull linux ffmpeg submodules
else
git -c submodule."ffmpeg-macos-x86_64".update=none \
-c submodule."ffmpeg-windows-x86_64".update=none \
-c submodule."ffmpeg-macos-aarch64".update=none \
submodule update --recursive --init
fi
git submodule update --recursive --init
}
build() {

1
third-party/build-deps vendored Submodule

Submodule third-party/build-deps added at 6e23b580e6