From dd3e2ddb479ebbf8d68cbf1fbf205035107fdd71 Mon Sep 17 00:00:00 2001 From: Eugene Hauptmann Date: Thu, 6 Jun 2024 15:00:37 -0400 Subject: [PATCH] AudioToolbox/AudioUnit.h --- build.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.rs b/build.rs index dc63156..6d63f5d 100644 --- a/build.rs +++ b/build.rs @@ -60,12 +60,12 @@ fn build(sdk_path: Option<&str>, target: &str) { // Since iOS 10.0, macOS 10.12, visionOS 1.0, all the functionality in AudioUnit // moved to AudioToolbox, and the AudioUnit headers have been simple // wrappers ever since. - if target.contains("apple-ios"){ + if target.contains("apple-ios") || target.contains("apple-visionos"){ // On iOS, the AudioUnit framework does not have (and never had) an // actual dylib to link to, it is just a few header files. // The AudioToolbox framework contains the symbols instead. println!("cargo:rustc-link-lib=framework=AudioToolbox"); - // headers.push("AudioToolbox/AudioUnit.h"); + headers.push("AudioToolbox/AudioUnit.h"); } else { // On macOS, the symbols are present in the AudioToolbox framework, // but only on macOS 10.12 and above. @@ -74,9 +74,9 @@ fn build(sdk_path: Option<&str>, target: &str) { // contains a dylib with the desired symbols, that we can link to // (in later versions just re-exports from AudioToolbox). println!("cargo:rustc-link-lib=framework=AudioUnit"); - // headers.push("AudioUnit/AudioUnit.h"); + headers.push("AudioUnit/AudioUnit.h"); } - headers.push("AudioUnit/AudioUnit.h"); + // headers.push("AudioUnit/AudioUnit.h"); } #[cfg(feature = "audio_toolbox")]