napi-rs/crates/build/src/lib.rs

15 lines
343 B
Rust
Raw Normal View History

mod android;
mod macos;
pub fn setup() {
println!("cargo:rerun-if-env-changed=DEBUG_GENERATED_CODE");
println!("cargo:rerun-if-env-changed=TYPE_DEF_TMP_PATH");
match std::env::var("CARGO_CFG_TARGET_OS").as_deref() {
Ok("macos") => {
macos::setup();
}
2022-06-10 16:20:06 +09:00
Ok("android") => if android::setup().is_ok() {},
_ => {}
2020-02-18 22:09:17 +09:00
}
}