summaryrefslogtreecommitdiff
path: root/bindgen
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-07-27 23:19:15 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-07-27 23:19:15 +1000
commit6b004c5ac6a25f1020774276803b62e8619ea61e (patch)
treefe8f4113b5454cec2f293098acc9a2f5ef0595de /bindgen
parentca4c92f7b74ebbfc80bd24630cd0ad3def6c20fc (diff)
env var for static lib
Diffstat (limited to 'bindgen')
-rw-r--r--bindgen/rust/celeritas-sys/build.rs6
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.