From 4d66c3e08bfa5c3565f3ec9fbf0dccee8c5ff13d Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sat, 25 May 2024 20:27:07 -0400 Subject: [PATCH] build(deps): use new ffmpeg build names --- cmake/dependencies/common.cmake | 35 ++++++++++++--------------------- third-party/build-deps | 2 +- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/cmake/dependencies/common.cmake b/cmake/dependencies/common.cmake index bddee0393a6..d10a769ca9c 100644 --- a/cmake/dependencies/common.cmake +++ b/cmake/dependencies/common.cmake @@ -22,36 +22,27 @@ include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS}) # ffmpeg pre-compiled binaries if(NOT DEFINED FFMPEG_PREPARED_BINARIES) if(WIN32) - if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64") - message(FATAL_ERROR "Unsupported system processor:" ${CMAKE_SYSTEM_PROCESSOR}) - endif() set(FFMPEG_PLATFORM_LIBRARIES mfplat ole32 strmiids mfuuid vpl) - set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/windows-x86_64") - elseif(APPLE) - if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") - set(FFMPEG_PREPARED_BINARIES "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/macos-x86_64") - elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64") - set(FFMPEG_PREPARED_BINARIES "${CMAKE_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() - message(FATAL_ERROR "Unsupported system processor:" ${CMAKE_SYSTEM_PROCESSOR}) - endif() - elseif(UNIX) + elseif(UNIX AND NOT APPLE) set(FFMPEG_PLATFORM_LIBRARIES numa 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_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_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_SOURCE_DIR}/third-party/build-deps/ffmpeg/linux-powerpc64le") - else() - message(FATAL_ERROR "Unsupported system processor:" ${CMAKE_SYSTEM_PROCESSOR}) endif() endif() + set(FFMPEG_PREPARED_BINARIES + "${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") + + # check if the directory exists + if(NOT EXISTS "${FFMPEG_PREPARED_BINARIES}") + message(FATAL_ERROR + "FFmpeg pre-compiled binaries not found at ${FFMPEG_PREPARED_BINARIES}. \ + Please consider contributing to the LizardByte/build-deps repository. \ + Optionally, you can use the FFMPEG_PREPARED_BINARIES option to specify the path to the \ + system-installed FFmpeg libraries") + endif() + if(EXISTS "${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a") set(HDR10_PLUS_LIBRARY "${FFMPEG_PREPARED_BINARIES}/lib/libhdr10plus.a") diff --git a/third-party/build-deps b/third-party/build-deps index 0896e890a70..324e011afab 160000 --- a/third-party/build-deps +++ b/third-party/build-deps @@ -1 +1 @@ -Subproject commit 0896e890a70d1e619870ccd294d134eaacc350e2 +Subproject commit 324e011afab7cacdb978ea96fc6adabd1f61ed17