Merge pull request #532 from bu5hm4nn/bug/fix-macos-ffmpeg-linking

Fix macOS linking
This commit is contained in:
Michael Dilger 2023-10-06 11:07:08 +13:00 committed by GitHub
commit 7848ceb056
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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(); .unwrap();
let git_hash = String::from_utf8(output.stdout).unwrap(); let git_hash = String::from_utf8(output.stdout).unwrap();
println!("cargo:rustc-env=GIT_HASH={git_hash}"); 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");
} }