fn main() {
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("macos") {
let dir = std::env::var("CARGO_MANIFEST_DIR")
.expect("CARGO_MANIFEST_DIR must be set by Cargo");
let plist = format!("{dir}/Info.plist");
println!("cargo:rustc-link-arg=-sectcreate");
println!("cargo:rustc-link-arg=__TEXT");
println!("cargo:rustc-link-arg=__info_plist");
println!("cargo:rustc-link-arg={plist}");
println!("cargo:rerun-if-changed=Info.plist");
}
}