From e1969c1d4137edd9b6c4c323f744470915a53708 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Tue, 19 Jan 2021 00:02:18 -0500 Subject: [PATCH] Use Amedee's latest build.rs but fix the Windows build Windows builds were broken. "native" wasn't a valid build type. --- .gitignore | 1 + build.rs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 698a4ba..42b7292 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ Cargo.lock *~ .*swp *.swo +.idea/ diff --git a/build.rs b/build.rs index 92d33dc..180a286 100644 --- a/build.rs +++ b/build.rs @@ -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");