wgpu/wgpu-core/build.rs

21 lines
720 B
Rust
Raw Normal View History

2020-10-28 17:35:53 +00:00
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
fn main() {
// Setup cfg aliases
cfg_aliases::cfg_aliases! {
// Vendors/systems
2020-12-17 20:47:57 +00:00
wasm: { target_arch = "wasm32" },
apple: { any(target_os = "ios", target_os = "macos") },
2020-12-17 20:47:57 +00:00
unix_wo_apple: {all(unix, not(apple))},
// Backends
2021-04-29 15:32:37 +00:00
vulkan: { all(not(wasm), any(windows, unix_wo_apple)) },
2020-12-17 20:47:57 +00:00
metal: { all(not(wasm), apple) },
dx12: { all(not(wasm), windows) },
dx11: { all(not(wasm), windows) },
gl: { any(wasm, unix_wo_apple) },
}
}