From 26c6c939a231259c00c9270fb0264cb219a8cd14 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Sun, 28 Jun 2026 21:49:27 +0000 Subject: [PATCH] fix(ci/apple): set CMAKE_POLICY_VERSION_MINIMUM=3.5 for the vendored libopus With cmake now found, Homebrew's CMake 4 refuses the vendored libopus's `cmake_minimum_required(VERSION <3.5)` ("Compatibility with CMake < 3.5 has been removed"). Export CMAKE_POLICY_VERSION_MINIMUM=3.5 (the same knob the Windows build uses) so the cmake crate's child cmake configures the audiopus_sys libopus. Co-Authored-By: Claude Opus 4.8 --- .gitea/workflows/apple.yml | 8 ++++++++ .gitea/workflows/release.yml | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/.gitea/workflows/apple.yml b/.gitea/workflows/apple.yml index 7438c2a..209e0b4 100644 --- a/.gitea/workflows/apple.yml +++ b/.gitea/workflows/apple.yml @@ -46,6 +46,10 @@ jobs: BREW_BIN="$(dirname "$BREW")"; export PATH="$BREW_BIN:$PATH" command -v cmake >/dev/null || "$BREW" install cmake echo "$BREW_BIN" >> "$GITHUB_PATH" + # Homebrew's CMake 4 dropped compatibility with the vendored libopus's pre-3.5 + # `cmake_minimum_required`; treat 3.5 as the policy minimum (the cmake crate's child cmake + # inherits this from the env during the xcframework build). + echo "CMAKE_POLICY_VERSION_MINIMUM=3.5" >> "$GITHUB_ENV" - name: Build PunktfunkCore.xcframework run: bash scripts/build-xcframework.sh @@ -97,6 +101,10 @@ jobs: BREW_BIN="$(dirname "$BREW")"; export PATH="$BREW_BIN:$PATH" command -v cmake >/dev/null || "$BREW" install cmake echo "$BREW_BIN" >> "$GITHUB_PATH" + # Homebrew's CMake 4 dropped compatibility with the vendored libopus's pre-3.5 + # `cmake_minimum_required`; treat 3.5 as the policy minimum (the cmake crate's child cmake + # inherits this from the env during the xcframework build). + echo "CMAKE_POLICY_VERSION_MINIMUM=3.5" >> "$GITHUB_ENV" - name: Build PunktfunkCore.xcframework (mac + iOS slices) run: BUILD_IOS=1 bash scripts/build-xcframework.sh diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 4390cc6..0ce1b23 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -130,6 +130,10 @@ jobs: BREW_BIN="$(dirname "$BREW")"; export PATH="$BREW_BIN:$PATH" command -v cmake >/dev/null || "$BREW" install cmake echo "$BREW_BIN" >> "$GITHUB_PATH" + # Homebrew's CMake 4 dropped compatibility with the vendored libopus's pre-3.5 + # `cmake_minimum_required`; treat 3.5 as the policy minimum (the cmake crate's child cmake + # inherits this from the env during the xcframework build). + echo "CMAKE_POLICY_VERSION_MINIMUM=3.5" >> "$GITHUB_ENV" - name: Build PunktfunkCore.xcframework (mac + iOS + tvOS) # tvOS is a tier-3 target (nightly -Zbuild-std): slow on the first build, then cached on