diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..348a1ec --- /dev/null +++ b/build.rs @@ -0,0 +1,7 @@ +fn main() { + match std::env::var("CARGO_CFG_TARGET_OS").as_deref() { + Ok("freebsd") => println!("cargo::rustc-link-search=native=/usr/local/lib"), + Ok("openbsd") => println!("cargo::rustc-link-search=native=/usr/X11R6/lib"), + _ => {} + } +}