Skip to content

Commit

Permalink
fix: link openblas path correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
thewh1teagle committed Aug 1, 2024
1 parent 744804a commit 67924ca
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,17 @@ fn main() {
}
#[cfg(feature = "openblas")]
{
println!("cargo:rustc-link-lib=openblas");
if let Ok(openblas_path) = env::var("OPENBLAS_PATH") {
println!(
"cargo::rustc-link-search={}",
PathBuf::from(openblas_path).join("lib").display()
);
}
if cfg!(windows) {
println!("cargo:rustc-link-lib=libopenblas");
} else {
println!("cargo:rustc-link-lib=openblas");
}
}
#[cfg(feature = "cuda")]
{
Expand Down

0 comments on commit 67924ca

Please sign in to comment.