2022-12-25 18:57:27 +11:00
|
|
|
use cfg_aliases::cfg_aliases;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
// The script doesn't depend on our code
|
2023-01-29 22:23:45 +11:00
|
|
|
println!("cargo:rerun-if-changed=build.rs");
|
|
|
|
|
2022-12-25 18:57:27 +11:00
|
|
|
// Setup cfg aliases
|
|
|
|
cfg_aliases! {
|
|
|
|
// Systems.
|
|
|
|
android_platform: { target_os = "android" },
|
2023-03-17 06:49:59 +11:00
|
|
|
wasm_platform: { target_family = "wasm" },
|
2022-12-25 18:57:27 +11:00
|
|
|
macos_platform: { target_os = "macos" },
|
|
|
|
ios_platform: { target_os = "ios" },
|
|
|
|
windows_platform: { target_os = "windows" },
|
|
|
|
apple: { any(target_os = "ios", target_os = "macos") },
|
|
|
|
free_unix: { all(unix, not(apple), not(android_platform)) },
|
2023-01-06 00:58:08 +11:00
|
|
|
redox: { target_os = "redox" },
|
2022-12-25 18:57:27 +11:00
|
|
|
|
|
|
|
// Native displays.
|
2023-01-06 00:58:08 +11:00
|
|
|
x11_platform: { all(feature = "x11", free_unix, not(wasm), not(redox)) },
|
|
|
|
wayland_platform: { all(feature = "wayland", free_unix, not(wasm), not(redox)) },
|
|
|
|
orbital_platform: { redox },
|
2022-12-25 18:57:27 +11:00
|
|
|
}
|
|
|
|
}
|