diff options
Diffstat (limited to 'plugins/warp')
| -rw-r--r-- | plugins/warp/build.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/warp/build.rs b/plugins/warp/build.rs index a9d6dd1d..4afc410f 100644 --- a/plugins/warp/build.rs +++ b/plugins/warp/build.rs @@ -7,7 +7,7 @@ fn main() { println!("cargo::rustc-link-lib=dylib=binaryninjacore"); println!("cargo::rustc-link-search={}", link_path.to_str().unwrap()); - #[cfg(not(target_os = "windows"))] + #[cfg(target_os = "linux")] { println!( "cargo::rustc-link-arg=-Wl,-rpath,{0},-L{0}", @@ -15,6 +15,13 @@ fn main() { ); } + #[cfg(target_os = "macos")] + { + let crate_name = std::env::var("CARGO_PKG_NAME").expect("CARGO_PKG_NAME not set"); + let lib_name = crate_name.replace('-', "_"); + println!("cargo::rustc-link-arg=-Wl,-install_name,@rpath/lib{}.dylib", lib_name); + } + let out_dir = std::env::var("OUT_DIR").expect("OUT_DIR specified"); let out_dir_path = PathBuf::from(out_dir); |
