main()1fn main() { 2 let target_dir = std::env::var_os("CARGO_TARGET_DIR").unwrap(); 3 4 // The main linking point with c++ code is the libbluetooth-static.a 5 // These includes all the symbols built via C++ but doesn't include other 6 // links (i.e. pkg-config) 7 println!("cargo:rustc-link-lib=static=bluetooth-static"); 8 println!("cargo:rustc-link-search=native={}", target_dir.clone().into_string().unwrap()); 9 10 // A few dynamic links 11 println!("cargo:rustc-link-lib=dylib=flatbuffers"); 12 println!("cargo:rustc-link-lib=dylib=protobuf"); 13 println!("cargo:rustc-link-lib=dylib=resolv"); 14 println!("cargo:rustc-link-lib=dylib=lc3"); 15 println!("cargo:rustc-link-lib=dylib=fmt"); 16 println!("cargo:rustc-link-lib=dylib=crypto"); 17 18 println!("cargo:rerun-if-changed=build.rs"); 19 } 20