1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-30 14:49:26 +03:00
wezterm/build.rs
Wez Furlong a2ad333f43 CI: target older macos versions
I'm just randomly picking 10.9 to see if it even builds... if that
doesn't work out I'll probably just pick 10.14

refs: https://github.com/wez/wezterm/issues/128
2020-01-24 16:24:45 -08:00

24 lines
869 B
Rust

use vergen::{generate_cargo_keys, ConstantsFlags};
fn main() {
let mut flags = ConstantsFlags::all();
flags.remove(ConstantsFlags::SEMVER_FROM_CARGO_PKG);
// Generate the 'cargo:' key output
generate_cargo_keys(ConstantsFlags::all()).expect("Unable to generate the cargo keys!");
// If a file named `.tag` is present, we'll take its contents for the
// version number that we report in wezterm -h.
let mut ci_tag = String::new();
if let Ok(tag) = std::fs::read(".tag") {
if let Ok(s) = String::from_utf8(tag) {
ci_tag = s.trim().to_string();
println!("cargo:rerun-if-changed=.tag");
}
}
println!("cargo:rustc-env=WEZTERM_CI_TAG={}", ci_tag);
println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.9");
#[cfg(windows)]
embed_resource::compile("assets/windows/resource.rc");
}