This is a bindgen wrapper of Loic Marechal's libMeshb.
If libMeshb.7.so
is not in the standard location you should define required environment variables in
.cargo/config.toml
(or define them in any other way):
[env]
LIBMESHB_INLCUDE_DIR="/path/to/libmeshb-install/include"
# or
LIBMESHB_DIR="/path/to/libmeshb-install"
# optionally
LIBMESHB_LIB_DIR="/path/to/lib"
Then
cargo add --git https://github.com/tucanos/libmeshb-sys.git
To have rpath
propagated to your executables add the following code to you build.rs
(see this bug report for details).
if let Ok(rpath) = std::env::var("DEP_MESHB.7_RPATH") {
#[cfg(target_os = "macos")]
println!("cargo:rustc-link-arg=-Wl,-rpath,{rpath}");
#[cfg(target_os = "linux")]
println!("cargo:rustc-link-arg=-Wl,-rpath,{rpath}");
}