From 2e5278fa738268d27f41da3462876b189f0a266b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Am=C3=A9d=C3=A9e=20d=27Aboville?= Date: Tue, 28 Jan 2020 18:16:45 -0500 Subject: [PATCH] Statically link the k4a lib. --- build.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.rs b/build.rs index ff6be43..db7629d 100644 --- a/build.rs +++ b/build.rs @@ -5,14 +5,14 @@ use std::env::consts; use std::path::PathBuf; fn main() { - println!("cargo:rustc-link-lib=k4a"); println!("cargo:rerun-if-changed=wrapper.h"); if cfg!(target_os = "linux") { - println!("cargo:rustc-link-search=./vendor/lib/linux"); + println!("cargo:rustc-link-search=native=./vendor/lib/linux"); } if cfg!(target_os = "windows") { - println!("cargo:rustc-link-search=./vendor/lib/windows/{}", consts::ARCH); + println!("cargo:rustc-link-search=native=./vendor/lib/windows/{}", consts::ARCH); } + println!("cargo:rustc-link-lib=static=k4a"); let bindings = bindgen::Builder::default() .header("wrapper.h")