use env;
// baseRT-sys emits the link-search + link-lib (those propagate to us), but
// Cargo does NOT propagate a dependency's `rustc-link-arg`, so the rpath it
// sets never reaches this crate's examples/tests/binaries. Re-emit the rpath
// here so `cargo run --example` / `cargo test` find libbaseRT.dylib at runtime
// without DYLD_LIBRARY_PATH. (Downstream user crates that build executables
// should do the same, or set an rpath / DYLD_LIBRARY_PATH — see README.)
//
// The directory comes from baseRT-sys, which resolves it (BASERT_LIB_DIR, a
// source checkout's build/, ~/.basert or Homebrew) and passes it on through its
// `links` metadata as DEP_BASERT_LIB_DIR. It is unset on docs.rs, where
// baseRT-sys links nothing.