1
0
mirror of https://github.com/timvisee/ffsend.git synced 2025-01-31 11:41:36 +01:00
ffsend/build.rs
timvisee 5f21b87937
Revert "Remove our complex clipboard logic, use clipboard-ext crate instead"
This reverts commit 8bfe173a181afad77b8b93106d20ac6a4799bea3.
2020-02-14 00:24:14 +01:00

38 lines
1.0 KiB
Rust

fn main() {
#[cfg(all(
feature = "clipboard",
any(
target_os = "linux",
target_os = "freebsd",
target_os = "dragonfly",
target_os = "openbsd",
target_os = "netbsd",
)
))]
{
// Select clipboard binary method
#[cfg(not(feature = "clipboard-crate"))]
println!("cargo:rustc-cfg=feature=\"clipboard-bin\"");
// xclip and xsel paths are inserted at compile time
println!("cargo:rerun-if-env-changed=XCLIP_PATH");
println!("cargo:rerun-if-env-changed=XSEL_PATH");
}
#[cfg(all(
feature = "clipboard",
not(any(
target_os = "linux",
target_os = "freebsd",
target_os = "dragonfly",
target_os = "openbsd",
target_os = "netbsd",
))
))]
{
// Select clipboard crate method
#[cfg(not(feature = "clipboard-bin"))]
println!("cargo:rustc-cfg=feature=\"clipboard-crate\"");
}
}