Separate build scripts for bin and library to fix macos ffmpeg library linking

This commit is contained in:
Bu5hm4nn 2023-10-05 12:11:12 -06:00
parent abf7f55008
commit 73c2d7d7db
2 changed files with 8 additions and 7 deletions

8
gossip-bin/build.rs Normal file
View File

@ -0,0 +1,8 @@
fn main() {
// link to bundled libraries
#[cfg(target_os = "macos")]
println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path");
#[cfg(target_os = "linux")]
println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN");
}

View File

@ -6,11 +6,4 @@ fn main() {
.unwrap();
let git_hash = String::from_utf8(output.stdout).unwrap();
println!("cargo:rustc-env=GIT_HASH={git_hash}");
// link to bundled libraries
#[cfg(target_os = "macos")]
println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path");
#[cfg(target_os = "linux")]
println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN");
}