diff options
Diffstat (limited to 'bindgen/rust/celeritas-sys')
-rw-r--r-- | bindgen/rust/celeritas-sys/build.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bindgen/rust/celeritas-sys/build.rs b/bindgen/rust/celeritas-sys/build.rs index e2c240b..13aa04d 100644 --- a/bindgen/rust/celeritas-sys/build.rs +++ b/bindgen/rust/celeritas-sys/build.rs @@ -31,8 +31,12 @@ fn main() { // Tell cargo to look for shared libraries in the specified directory // TODO: we need to look based on OS - println!("cargo:rustc-link-search=../../../build/macosx/arm64/debug"); // println!("cargo:rustc-link-search=../../build/windows/x64/debug"); + + let static_lib_path = std::env::var("CELERITAS_CORE_LIB") + .unwrap_or("../../../build/macosx/arm64/debug".to_string()); + + println!("cargo:rustc-link-search={static_lib_path}"); // Tell cargo to tell rustc to link the system bzip2 // shared library. |