Use alternate clipboard method for FreeBSD and other BSD derivatives

This commit is contained in:
timvisee 2019-05-02 16:37:45 +02:00
parent d5bc5a4289
commit ab55390ba8
No known key found for this signature in database
GPG key ID: B8DB720BC383E172
4 changed files with 242 additions and 32 deletions

View file

@ -1,6 +1,15 @@
fn main() {
// xclip and xsel paths are inserted at compile time on Linux
#[cfg(all(feature = "clipboard", target_os = "linux"))]
#[cfg(all(
feature = "clipboard",
any(
target_os = "linux",
target_os = "freebsd",
target_os = "dragonfly",
target_os = "openbsd",
target_os = "netbsd",
)
))]
{
println!("cargo:rerun-if-env-changed=XCLIP_PATH");
println!("cargo:rerun-if-env-changed=XSEL_PATH");