mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 22:53:15 -04:00
This requires a lot of restructuring on the backend side, as we need to accommodate for backends not being able to construct these types implicitly. In addition, we also need to expose some new APIs on these types to make them usable. Several breaking changes occurred in this commit. Signed-off-by: John Nunley <dev@notgull.net>
25 lines
908 B
Rust
25 lines
908 B
Rust
use cfg_aliases::cfg_aliases;
|
|
|
|
fn main() {
|
|
// The script doesn't depend on our code
|
|
println!("cargo:rerun-if-changed=build.rs");
|
|
|
|
// Setup cfg aliases
|
|
cfg_aliases! {
|
|
// Systems.
|
|
android_platform: { target_os = "android" },
|
|
web_platform: { all(target_family = "wasm", target_os = "unknown") },
|
|
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), not(target_os = "emscripten")) },
|
|
redox: { target_os = "redox" },
|
|
|
|
// Native displays.
|
|
x11_platform: { all(feature = "x11", free_unix, not(redox)) },
|
|
wayland_platform: { all(feature = "wayland", free_unix, not(redox)) },
|
|
orbital_platform: { redox },
|
|
}
|
|
}
|