From 742333928151729c1266845626df16861cc42477 Mon Sep 17 00:00:00 2001 From: Slava Zavadsky Date: Sun, 9 Aug 2026 11:45:39 -0400 Subject: [PATCH] fix(build): set CMAKE_POLICY_VERSION_MINIMUM for audiopus_sys in cargo env audiopus_sys 0.2.2 builds its vendored Opus via the cmake crate, and the bundled opus CMakeLists still declares cmake_minimum_required(VERSION 3.1). CMake 4.0 removed compatibility with < 3.5, so any dev host with a modern cmake fails cargo check/clippy on pi-voice with 'Compatibility with CMake < 3.5 has been removed from CMake.' The bazel build already sets this override for the same crate (audiopus_sys annotation in MODULE.bazel); mirror it in .cargo/config.toml so the cargo path (bun check:rs) works on CMake 4.x hosts too. --- .cargo/config.toml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 000000000..f832ab7e6 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,11 @@ +# Cargo environment for the workspace. +# +# audiopus_sys 0.2.2 builds its vendored Opus via the `cmake` crate, and the +# bundled opus CMakeLists still declares `cmake_minimum_required(VERSION 3.1)`. +# CMake 4.0 removed compatibility with < 3.5, so any dev host with a modern +# cmake fails `cargo check`/`cargo clippy` on pi-voice with +# "Compatibility with CMake < 3.5 has been removed from CMake." The bazel build +# already sets this override for the same crate (see the audiopus_sys +# annotation in MODULE.bazel); mirror it here so the cargo path works too. +[env] +CMAKE_POLICY_VERSION_MINIMUM = "3.5"