fn main() {
let target_os = std::env::var("CARGO_CFG_TARGET_OS").expect("set by cargo");
println!("cargo:rerun-if-changed=scripts/build.rs");
println!(
"cargo:rustc-env=NU_FEATURES={}",
std::env::var("CARGO_CFG_FEATURE").expect("set by cargo")
);
if target_os == "windows" {
println!("cargo:rerun-if-changed=assets/nu_logo.ico");
let mut res = winresource::WindowsResource::new();
res.set_icon("assets/nu_logo.ico");
res.compile()
.expect("Failed to run the Windows resource compiler (rc.exe)");
} else {
println!("cargo:rustc-link-arg-benches=-rdynamic");
}
}