Skip to content

Commit

Permalink
fix(sys): android dependency search path (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
rustui authored Feb 3, 2024
1 parent 4fb6fba commit 7419ef3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ort-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,12 @@ fn prepare_libort_dir() -> (PathBuf, bool) {
#[allow(clippy::type_complexity)]
let static_configs: Vec<(PathBuf, PathBuf, PathBuf, Box<dyn Fn(PathBuf, &String) -> PathBuf>)> = vec![
(lib_dir.join(&profile), lib_dir.join("lib"), lib_dir.join("_deps"), Box::new(|p: PathBuf, profile| p.join(profile))),
(lib_dir.join(&profile), lib_dir.join("lib"), lib_dir.join(&profile).join("_deps"), Box::new(|p: PathBuf, _| p)),
(lib_dir.clone(), lib_dir.join("lib"), lib_dir.parent().unwrap().join("_deps"), Box::new(|p: PathBuf, _| p)),
(lib_dir.join("onnxruntime"), lib_dir.join("onnxruntime").join("lib"), lib_dir.join("_deps"), Box::new(|p: PathBuf, _| p)),
];
for (lib_dir, extension_lib_dir, external_lib_dir, transform_dep) in static_configs {
if lib_dir.join(platform_format_lib("onnxruntime_common")).exists() {
if lib_dir.join(platform_format_lib("onnxruntime_common")).exists() && external_lib_dir.exists() {
add_search_dir(&lib_dir);

for lib in &["common", "flatbuffers", "framework", "graph", "mlas", "optimizer", "providers", "session", "util"] {
Expand Down

0 comments on commit 7419ef3

Please sign in to comment.