diff --git a/build.rs b/build.rs index b7871b9..04d40c5 100644 --- a/build.rs +++ b/build.rs @@ -146,6 +146,8 @@ fn build(sdk_path: Option<&str>, target: &str) { builder = builder.size_t_is_usize(true); builder = builder.clang_args(&[&format!("--target={}", target)]); + // idea from https://github.com/RustAudio/coreaudio-sys/issues/23#issuecomment-507364379 + builder = builder.clang_args(&["-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Kernel.framework", "-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk//usr/include"]); if let Some(sdk_path) = sdk_path { builder = builder.clang_args(&["-isysroot", sdk_path]);