Skip to content

Commit

Permalink
support soname for macos (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
reiase authored Jul 10, 2023
1 parent 0974d6f commit 1a836c2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
use std::env;

fn main() {
println!("cargo:rustc-cdylib-link-arg=-Wl,-soname,librbackend.abi3.so")
let target = env::var("TARGET").unwrap();
if target.contains("linux") {
println!("cargo:rustc-cdylib-link-arg=-Wl,-soname,librbackend.abi3.so")
}
if target.contains("apple") {
println!("cargo:rustc-cdylib-link-arg=-Wl,-install_name,librbackend.abi3.so")
}
}

0 comments on commit 1a836c2

Please sign in to comment.