1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00
libpsyc/rust/build.rs

18 lines
544 B
Rust

use std::env;
use std::process::Command;
use std::path::*;
fn main() {
Command::new("make")
.arg("-C")
.arg("..")
.output()
.unwrap_or_else(|e| panic!("failed to execute process: {}", e));
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let path = Path::new(&manifest_dir).parent().unwrap().join("lib");
println!("cargo:rustc-link-search=native={}", path.display());
println!("cargo:rerun-if-changed={}", path.display());
println!("cargo:rustc-link-lib=static=psyc");
}