2020-03-30 09:56:40 +00:00
|
|
|
use std::env;
|
|
|
|
use std::fs;
|
|
|
|
use std::path::PathBuf;
|
2020-03-05 13:51:50 +00:00
|
|
|
|
|
|
|
fn main() {
|
2020-03-30 09:56:40 +00:00
|
|
|
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
|
|
|
|
|
|
|
|
fs::copy(
|
|
|
|
"lib/vcp-2.12.28/amd64/ftd2xx.lib",
|
|
|
|
out_dir.join(format!("ftd2xx.lib")),
|
|
|
|
)
|
|
|
|
.unwrap();
|
|
|
|
println!("cargo:rustc-link-search=native={}", out_dir.into_os_string().into_string().expect("invalid path string"));
|
|
|
|
// println!("cargo:rustc-link-search=native={}", vcp_dir);
|
2020-03-05 13:51:50 +00:00
|
|
|
// println!("cargo:rustc-link-lib=static={}/ftd2xx", vcp_dir);
|
|
|
|
// cc::Build::new()
|
|
|
|
// .file("foo.c")
|
|
|
|
// .file("bar.c")
|
|
|
|
// .compile("foo");
|
|
|
|
}
|