summaryrefslogtreecommitdiff
path: root/bindgen/rust/celeritas-sys/build.rs
diff options
context:
space:
mode:
authoromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-10-05 18:12:49 +1000
committeromniscient <17525998+omnisci3nce@users.noreply.github.com>2024-10-05 18:12:49 +1000
commit5d1750d9adfc45b53c75310c58e31dfdbd8a6e15 (patch)
tree96b30140b33744a4392af091e79e65bcfc5886d5 /bindgen/rust/celeritas-sys/build.rs
parent8ce117f0b3fd4ceeb1d7058dde8793e4421ec076 (diff)
static link
Diffstat (limited to 'bindgen/rust/celeritas-sys/build.rs')
-rw-r--r--bindgen/rust/celeritas-sys/build.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/bindgen/rust/celeritas-sys/build.rs b/bindgen/rust/celeritas-sys/build.rs
index e8c54bd..8fdc9c4 100644
--- a/bindgen/rust/celeritas-sys/build.rs
+++ b/bindgen/rust/celeritas-sys/build.rs
@@ -46,15 +46,19 @@ fn main() {
// TODO: we need to look based on OS
// Tell cargo to look for shared libraries in the specified directory
- let static_lib_path = "/Users/josh/code/CodenameVentus/deps/cel-core/build".to_string();
// 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}");
+ // println!("cargo:rustc-link-search={static_lib_path}");
+
+ let lib_path = PathBuf::from("/Users/josh/code/CodenameVentus/deps/cel-core/build");
+
+ // Tell cargo to look for shared libraries in the specified directory
+ println!("cargo:rustc-link-search={}", lib_path.to_str().unwrap());
// Tell cargo to tell rustc to link the necc. libraries
- println!("cargo:rustc-link-lib=celeritas");
- println!("cargo:rustc-link-lib=glfw");
+ println!("cargo:rustc-link-lib=static=celeritas");
+ // println!("cargo:rustc-link-lib=glfw");
// The bindgen::Builder is the main entry point
// to bindgen, and lets you build up options for