From 21ad6c52626244c2001803b6d332582ec7d61996 Mon Sep 17 00:00:00 2001 From: Eugene Hauptmann Date: Thu, 6 Jun 2024 15:35:34 -0400 Subject: [PATCH] comment out audio_toolbox for visionos --- build.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build.rs b/build.rs index 404b4d3..e6a6ca4 100644 --- a/build.rs +++ b/build.rs @@ -66,7 +66,7 @@ fn build(sdk_path: Option<&str>, target: &str) { // The AudioToolbox framework contains the symbols instead. println!("cargo:rustc-link-lib=framework=AudioToolbox"); headers.push("AudioToolbox/AudioUnit.h"); - } else if(!target.contains("apple-visionos")){ + } else if !target.contains("apple-visionos") { // On macOS, the symbols are present in the AudioToolbox framework, // but only on macOS 10.12 and above. // @@ -81,8 +81,10 @@ fn build(sdk_path: Option<&str>, target: &str) { #[cfg(feature = "audio_toolbox")] { - println!("cargo:rustc-link-lib=framework=AudioToolbox"); - headers.push("AudioToolbox/AudioToolbox.h"); + if !target.contains("apple-visionos") { + println!("cargo:rustc-link-lib=framework=AudioToolbox"); + headers.push("AudioToolbox/AudioToolbox.h"); + } } #[cfg(feature = "core_audio")]