Skip to content

Commit

Permalink
Merge pull request #22 from azriel91/maintenance/bump-bindgen-version
Browse files Browse the repository at this point in the history
Updated `bindgen` version.
  • Loading branch information
Rhuagh authored Jan 14, 2019
2 parents 8f704ce + 129d957 commit 51e90d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository = "https://github.com/RustAudio/coreaudio-sys.git"
build = "build.rs"

[build-dependencies]
bindgen = "0.32"
bindgen = "0.42"

[features]
default = ["audio_toolbox", "audio_unit", "core_audio", "open_al", "core_midi"]
Expand Down
9 changes: 6 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ fn frameworks_path() -> Result<String, std::io::Error> {
let infix = if prefix == "/Library/Developer/CommandLineTools" {
format!("SDKs/{}.sdk", platform)
} else {
format!("Platforms/{}.platform/Developer/SDKs/{}.sdk", platform, platform)
format!(
"Platforms/{}.platform/Developer/SDKs/{}.sdk",
platform, platform
)
};

let suffix = "System/Library/Frameworks";
Expand Down Expand Up @@ -131,8 +134,8 @@ fn build(frameworks_path: &str) {

// Link to all frameworks.
for relative_path in frameworks {
let absolute_path = format!("{}/{}", frameworks_path, relative_path);
builder = builder.link_framework(absolute_path);
let link_instruction = format!("#[link = \"{}/{}\"]", frameworks_path, relative_path);
builder = builder.raw_line(link_instruction);
}

// Generate the bindings.
Expand Down

0 comments on commit 51e90d8

Please sign in to comment.