wgpu/wgpu-core/build.rs

21 lines
753 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-06-08 15:46:53 +00:00
vulkan: { all(false, not(wasm), any(windows, unix_wo_apple)) },
2020-12-17 20:47:57 +00:00
metal: { all(not(wasm), apple) },
2021-06-08 15:46:53 +00:00
dx12: { all(false, not(wasm), windows) },
dx11: { all(false, not(wasm), windows) },
gl: { all(false, any(wasm, unix_wo_apple)) },
}
}