mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-05-20 20:48:35 +03:00
move feature flags to build.rs (#439)
This commit is contained in:
committed by
GitHub
parent
1fa3800d3c
commit
a9461ae830
31
input-emulation/build.rs
Normal file
31
input-emulation/build.rs
Normal file
@@ -0,0 +1,31 @@
|
||||
fn main() {
|
||||
let unix = cfg!(unix);
|
||||
let libei = cfg!(feature = "libei");
|
||||
let x11 = cfg!(feature = "x11");
|
||||
let macos = cfg!(target_os = "macos");
|
||||
let wlroots = cfg!(feature = "wlroots");
|
||||
let rdp = cfg!(feature = "remote_desktop_portal");
|
||||
|
||||
let libei = unix && !macos && libei;
|
||||
let wlroots = unix && !macos && wlroots;
|
||||
let x11 = unix && !macos && x11;
|
||||
let rdp = unix && !macos && rdp;
|
||||
|
||||
println!("cargo::rustc-check-cfg=cfg(wlroots)");
|
||||
println!("cargo::rustc-check-cfg=cfg(libei)");
|
||||
println!("cargo::rustc-check-cfg=cfg(x11)");
|
||||
println!("cargo::rustc-check-cfg=cfg(rdp)");
|
||||
|
||||
if libei {
|
||||
println!("cargo::rustc-cfg=libei");
|
||||
}
|
||||
if x11 {
|
||||
println!("cargo::rustc-cfg=x11");
|
||||
}
|
||||
if wlroots {
|
||||
println!("cargo::rustc-cfg=wlroots");
|
||||
}
|
||||
if rdp {
|
||||
println!("cargo::rustc-cfg=rdp");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user