mirror of
https://github.com/storytold/k4a-sys-temp.git
synced 2026-10-17 00:23:44 +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
|
||||
*.swo
|
||||
.idea/
|
||||
|
||||
@@ -10,8 +10,8 @@ fn main() {
|
||||
println!("cargo:rustc-link-lib=dylib=k4a");
|
||||
}
|
||||
if cfg!(target_os = "windows") {
|
||||
println!("cargo:rustc-link-search=native=./vendor/lib/windows/{}", consts::ARCH);
|
||||
println!("cargo:rustc-link-lib=native=k4a");
|
||||
println!("cargo:rustc-link-search=dylib=./vendor/lib/windows/{}", consts::ARCH);
|
||||
println!("cargo:rustc-link-lib=dylib=k4a");
|
||||
}
|
||||
|
||||
let bindings = bindgen::Builder::default()
|
||||
@@ -20,6 +20,7 @@ fn main() {
|
||||
.whitelist_function("k4a.*")
|
||||
.whitelist_type("_?[kK]4[aA].*")
|
||||
.whitelist_var("[kK]4[aA].*")
|
||||
.rustified_enum("[kK]4[aA].*")
|
||||
.parse_callbacks(Box::new(bindgen::CargoCallbacks))
|
||||
.generate()
|
||||
.expect("Unable to generate bindings");
|
||||
|
||||
Reference in New Issue
Block a user