2019-03-25 18:15:25 +00:00
|
|
|
fn main() {
|
2019-05-02 14:37:45 +00:00
|
|
|
#[cfg(all(
|
|
|
|
feature = "clipboard",
|
|
|
|
any(
|
|
|
|
target_os = "linux",
|
|
|
|
target_os = "freebsd",
|
|
|
|
target_os = "dragonfly",
|
|
|
|
target_os = "openbsd",
|
|
|
|
target_os = "netbsd",
|
|
|
|
)
|
|
|
|
))]
|
2019-03-25 18:15:25 +00:00
|
|
|
{
|
2019-05-02 15:23:38 +00:00
|
|
|
// 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
|
2019-03-25 18:15:25 +00:00
|
|
|
println!("cargo:rerun-if-env-changed=XCLIP_PATH");
|
|
|
|
println!("cargo:rerun-if-env-changed=XSEL_PATH");
|
|
|
|
}
|
2019-05-02 15:23:38 +00:00
|
|
|
|
|
|
|
#[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\"");
|
|
|
|
}
|
2019-03-25 18:15:25 +00:00
|
|
|
}
|