fix: link openblas path correctly

This commit is contained in:
thewh1teagle 2024-08-01 16:24:44 +03:00
parent 744804a8aa
commit 67924ca473
No known key found for this signature in database

View file

@ -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")]
{