wgpu/wgpu-core/build.rs
Zicklag 7572dbeaf9 Use CFG Aliases to Replace the backends! Macro
Uses the `cfg_aliases` crate to replace the `backends!` macro and
provide a more natural way to gate backend specific code.
2020-08-29 21:55:17 -05:00

15 lines
380 B
Rust

fn main() {
// Setup cfg aliases
cfg_aliases::cfg_aliases! {
// Vendors/systems
apple: { any(target_os = "ios", target_os = "macos") },
// Backends
vulkan: { any(windows, all(unix, not(apple)), feature = "gfx-backend-vulkan") },
metal: { apple },
dx12: { windows },
dx11: { windows },
gl: { unix },
}
}