mirror of
https://github.com/storytold/k4a-sys-temp.git
synced 2026-10-21 07:45:01 +00:00
Statically link the k4a lib.
This commit is contained in:
@@ -5,14 +5,14 @@ use std::env::consts;
|
|||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("cargo:rustc-link-lib=k4a");
|
|
||||||
println!("cargo:rerun-if-changed=wrapper.h");
|
println!("cargo:rerun-if-changed=wrapper.h");
|
||||||
if cfg!(target_os = "linux") {
|
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") {
|
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()
|
let bindings = bindgen::Builder::default()
|
||||||
.header("wrapper.h")
|
.header("wrapper.h")
|
||||||
|
|||||||
Reference in New Issue
Block a user