Skip to content

Commit

Permalink
comment out audio_toolbox for visionos
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenehp committed Jun 6, 2024
1 parent 3eaa192 commit 21ad6c5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand All @@ -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")]
Expand Down

0 comments on commit 21ad6c5

Please sign in to comment.