From 7a23d6aa814667e60192ddf633e4301950ca66e0 Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Tue, 20 Dec 2022 14:38:50 -0500 Subject: [PATCH] macOS arm64 (#591) --- .gitmodules | 4 ++++ CMakeLists.txt | 6 +++++- docs/source/building/macos.rst | 2 +- packaging/macos/Portfile | 1 + third-party/ffmpeg-macos-aarch64 | 1 + 5 files changed, 12 insertions(+), 2 deletions(-) create mode 160000 third-party/ffmpeg-macos-aarch64 diff --git a/.gitmodules b/.gitmodules index 1469a6c3..bf47edee 100644 --- a/.gitmodules +++ b/.gitmodules @@ -38,3 +38,7 @@ path = third-party/ffmpeg-linux-aarch64 url = https://github.com/LizardByte/build-deps branch = ffmpeg-linux-aarch64 +[submodule "ffmpeg-macos-aarch64"] + path = third-party/ffmpeg-macos-aarch64 + url = https://github.com/LizardByte/build-deps + branch = ffmpeg-macos-aarch64 diff --git a/CMakeLists.txt b/CMakeLists.txt index 05086627..f48fdaeb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -375,7 +375,11 @@ if(WIN32) set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-windows-x86_64") set(FFMPEG_PLATFORM_LIBRARIES mfplat ole32 strmiids mfuuid) elseif(APPLE) - set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-macos-x86_64") + if (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64") + set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-macos-aarch64") + else() + set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-macos-x86_64") + endif() else() if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") set(FFMPEG_PREPARED_BINARIES "${CMAKE_CURRENT_SOURCE_DIR}/third-party/ffmpeg-linux-aarch64") diff --git a/docs/source/building/macos.rst b/docs/source/building/macos.rst index 447a0fd6..5a6fb5c6 100644 --- a/docs/source/building/macos.rst +++ b/docs/source/building/macos.rst @@ -12,7 +12,7 @@ MacPorts Install Requirements .. code-block:: bash - sudo port install boost cmake libopus npm9 + sudo port install avahi boost180 cmake curl libopus npm9 pkgconfig Homebrew """""""" diff --git a/packaging/macos/Portfile b/packaging/macos/Portfile index 6cd0f685..246c5521 100644 --- a/packaging/macos/Portfile +++ b/packaging/macos/Portfile @@ -32,6 +32,7 @@ post-fetch { } depends_lib port:avahi \ + port:boost180 \ port:curl \ port:libopus \ port:npm9 \ diff --git a/third-party/ffmpeg-macos-aarch64 b/third-party/ffmpeg-macos-aarch64 new file mode 160000 index 00000000..9103674a --- /dev/null +++ b/third-party/ffmpeg-macos-aarch64 @@ -0,0 +1 @@ +Subproject commit 9103674a57ab04f5109d4e10812fbf9f22685468