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,8 +37,18 @@ fn main() {
} }
#[cfg(feature = "openblas")] #[cfg(feature = "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"); println!("cargo:rustc-link-lib=openblas");
} }
}
#[cfg(feature = "cuda")] #[cfg(feature = "cuda")]
{ {
println!("cargo:rustc-link-lib=cublas"); println!("cargo:rustc-link-lib=cublas");