From ca6b5441cc168d69a337aa2e48eda268822acafd Mon Sep 17 00:00:00 2001 From: Dicot0721 <149964080+Dicot0721@users.noreply.github.com> Date: Sun, 9 Aug 2026 04:03:34 +0800 Subject: [PATCH] ci: Add iOS build --- .github/workflows/build.yml | 21 ++++++++++++++++++++- CMakeLists.txt | 4 ++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2eaf119def..9a5b8880e4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,13 +11,15 @@ jobs: strategy: fail-fast: false matrix: - build: [linux, windows, macos, android] + build: [linux, windows, macos, android, ios] arch: [x64, arm, arm64] exclude: - build: windows arch: arm - build: macos arch: arm + - build: ios + arch: arm include: - build: linux @@ -75,6 +77,23 @@ jobs: arch: arm triplet: neon-android + - build: ios + os: macos-latest + triplet: ios-release + vcpkg-root: /Users/runner/vcpkg + extra-args: "" + + - build: ios + arch: x64 + triplet: ios + + - build: ios-simulator + os: macos-latest + arch: arm64 + triplet: ios-simulator-release + vcpkg-root: /Users/runner/vcpkg + extra-args: "" + steps: - run: git config --global core.autocrlf input diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c78b0c647..653274957d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,10 @@ target_include_directories(${FFMPEG_CORE_NAME} INTERFACE "${CMAKE_CURRENT_SOURCE # Detect OS if (WIN32 AND NOT MINGW) set(FFMPEG_PREBUILTS_NAME "ffmpeg-windows") +elseif (IOS AND (ARCHITECTURE STREQUAL "arm64") AND (CMAKE_OSX_SYSROOT STREQUAL "iphonesimulator")) + set(FFMPEG_PREBUILTS_NAME "ffmpeg-ios-simulator") +elseif (IOS) + set(FFMPEG_PREBUILTS_NAME "ffmpeg-ios") elseif (APPLE) set(FFMPEG_PREBUILTS_NAME "ffmpeg-macos") elseif (ANDROID)