winit-core: new crate + split out as_any
This commit is contained in:
parent
bf0bde8067
commit
3493a20173
8 changed files with 73 additions and 4 deletions
26
winit-core/build.rs
Normal file
26
winit-core/build.rs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
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: { all(target_vendor = "apple", not(target_os = "macos")) },
|
||||
windows_platform: { target_os = "windows" },
|
||||
free_unix: { all(unix, not(target_vendor = "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 },
|
||||
}
|
||||
|
||||
// Winit defined cfgs.
|
||||
println!("cargo:rustc-check-cfg=cfg(unreleased_changelogs)");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue