mirror of
https://github.com/logos-messaging/logos-chat-rs.git
synced 2026-05-18 21:39:44 +00:00
19 lines
679 B
Rust
19 lines
679 B
Rust
fn main() -> Result<(), std::io::Error> {
|
|
let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
|
|
let libs_dir = std::path::Path::new(&manifest_dir).join("libs");
|
|
println!("cargo:rustc-link-search=native={}", libs_dir.display());
|
|
|
|
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
|
|
match target_os.as_str() {
|
|
"macos" | "linux" => {
|
|
println!("cargo:rustc-link-lib=dylib=waku");
|
|
println!("cargo:rustc-link-arg=-Wl,-rpath,{}", libs_dir.display());
|
|
}
|
|
other => {
|
|
panic!("Unsupported target OS: {other}. Only macOS and Linux are supported.");
|
|
}
|
|
}
|
|
|
|
Ok(())
|
|
}
|