Skip to content

Commit

Permalink
and AudioUnit.h again
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenehp committed Jun 6, 2024
1 parent 872095d commit fc5aec4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ 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");
} else if !target.contains("apple-visionos") {
} else {
// On macOS, the symbols are present in the AudioToolbox framework,
// but only on macOS 10.12 and above.
//
Expand Down

0 comments on commit fc5aec4

Please sign in to comment.