mirror of
https://github.com/storytold/k4a-sys-temp.git
synced 2026-10-29 08:56:50 +00:00
Use Amedee's latest build.rs but fix the Windows build
Windows builds were broken. "native" wasn't a valid build type.
This commit is contained in:
@@ -3,3 +3,4 @@ Cargo.lock
|
|||||||
*~
|
*~
|
||||||
.*swp
|
.*swp
|
||||||
*.swo
|
*.swo
|
||||||
|
.idea/
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ fn main() {
|
|||||||
println!("cargo:rustc-link-lib=dylib=k4a");
|
println!("cargo:rustc-link-lib=dylib=k4a");
|
||||||
}
|
}
|
||||||
if cfg!(target_os = "windows") {
|
if cfg!(target_os = "windows") {
|
||||||
println!("cargo:rustc-link-search=native=./vendor/lib/windows/{}", consts::ARCH);
|
println!("cargo:rustc-link-search=dylib=./vendor/lib/windows/{}", consts::ARCH);
|
||||||
println!("cargo:rustc-link-lib=native=k4a");
|
println!("cargo:rustc-link-lib=dylib=k4a");
|
||||||
}
|
}
|
||||||
|
|
||||||
let bindings = bindgen::Builder::default()
|
let bindings = bindgen::Builder::default()
|
||||||
@@ -20,6 +20,7 @@ fn main() {
|
|||||||
.whitelist_function("k4a.*")
|
.whitelist_function("k4a.*")
|
||||||
.whitelist_type("_?[kK]4[aA].*")
|
.whitelist_type("_?[kK]4[aA].*")
|
||||||
.whitelist_var("[kK]4[aA].*")
|
.whitelist_var("[kK]4[aA].*")
|
||||||
|
.rustified_enum("[kK]4[aA].*")
|
||||||
.parse_callbacks(Box::new(bindgen::CargoCallbacks))
|
.parse_callbacks(Box::new(bindgen::CargoCallbacks))
|
||||||
.generate()
|
.generate()
|
||||||
.expect("Unable to generate bindings");
|
.expect("Unable to generate bindings");
|
||||||
|
|||||||
Reference in New Issue
Block a user