2021-03-31 06:31:52 +09:00
|
|
|
mod macos;
|
2021-04-02 07:32:01 +09:00
|
|
|
|
|
|
|
cfg_if::cfg_if! {
|
|
|
|
if #[cfg(not(target_env = "musl"))] {
|
|
|
|
mod windows;
|
|
|
|
}
|
|
|
|
}
|
2021-03-31 06:31:52 +09:00
|
|
|
|
|
|
|
pub fn setup() {
|
|
|
|
match std::env::var("CARGO_CFG_TARGET_OS").as_deref() {
|
|
|
|
Ok("macos") => macos::setup(),
|
2021-04-02 07:32:01 +09:00
|
|
|
Ok("windows") => {
|
|
|
|
cfg_if::cfg_if! {
|
|
|
|
if #[cfg(not(target_env = "musl"))] {
|
|
|
|
windows::setup()
|
|
|
|
} else {
|
|
|
|
eprintln!("Cross compiling to windows-msvc is not supported from *-musl hosts")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-03-31 06:31:52 +09:00
|
|
|
_ => {}
|
2020-02-18 22:09:17 +09:00
|
|
|
}
|
|
|
|
}
|