On Unix, add option to pick backends
Add features 'x11' and 'wayland' to pick backends on Linux/BSD, with both enabled by default. Fixes #774.
This commit is contained in:
parent
5a6cfc314e
commit
c1ea0dde92
10 changed files with 323 additions and 200 deletions
21
build.rs
Normal file
21
build.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#[cfg(all(
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd"
|
||||
),
|
||||
not(feature = "x11"),
|
||||
not(feature = "wayland")
|
||||
))]
|
||||
compile_error!("at least one of the \"x11\"/\"wayland\" features must be enabled");
|
||||
|
||||
#[cfg(all(
|
||||
target_arch = "wasm32",
|
||||
not(feature = "web-sys"),
|
||||
not(feature = "stdweb")
|
||||
))]
|
||||
compile_error!("at least one of the \"web-sys\"/\"stdweb\" features must be enabled");
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue