From 129d9577480367ccc0e360b4ea40bc73965803ac Mon Sep 17 00:00:00 2001 From: Azriel Hoh Date: Thu, 18 Oct 2018 08:21:39 +1300 Subject: [PATCH] Updated `bindgen` version. --- Cargo.toml | 2 +- build.rs | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6704d6d..ff180a0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] diff --git a/build.rs b/build.rs index efac340..2974293 100644 --- a/build.rs +++ b/build.rs @@ -51,7 +51,10 @@ fn frameworks_path() -> Result { 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"; @@ -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.