Use cfg_aliases crate to make Wayland/X #[cfg(..)] less redundant

This commit is contained in:
Ian Douglas Scott 2022-12-27 15:17:42 -08:00
parent 4f6542ceaa
commit a90c7bca04
3 changed files with 19 additions and 54 deletions

7
build.rs Normal file
View file

@ -0,0 +1,7 @@
fn main() {
cfg_aliases::cfg_aliases! {
free_unix: { all(unix, not(any(target_vendor = "apple", target_os = "android", target_os = "redox"))) },
x11_platform: { all(feature = "x11", free_unix, not(target_arch = "wasm32")) },
wayland_platform: { all(feature = "wayland", free_unix, not(target_arch = "wasm32")) },
}
}