Temporary headers fix to allow bindgen to be used

This commit is contained in:
Cobrand
2017-11-03 23:14:04 -07:00
parent a006792534
commit a70353d686
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ name = "sdl2_sys"
path = "src/lib.rs"
[build-dependencies.bindgen]
version = "0.30"
version = "0.31"
optional = true
[build-dependencies.pkg-config]
+8
View File
@@ -262,6 +262,14 @@ fn generate_bindings<S: AsRef<str> + ::std::fmt::Debug>(target: &str, host: &str
}
}
if target_os == "windows-msvc" {
bindings = bindings.clang_arg(format!("-IC:/Program Files (x86)/Windows Kits/8.1/Include/shared"));
bindings = bindings.clang_arg(format!("-IC:/Program Files/LLVM/lib/clang/5.0.0/include"));
bindings = bindings.clang_arg(format!("-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.10240.0/ucrt"));
bindings = bindings.clang_arg(format!("-IC:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include"));
bindings = bindings.clang_arg(format!("-IC:/Program Files (x86)/Windows Kits/8.1/Include/um"));
};
// SDL2 hasn't a default configuration for Linux
if target_os == "linux" {
bindings = bindings.clang_arg("-DSDL_VIDEO_DRIVER_X11");