fix: link openblas path correctly
This commit is contained in:
parent
744804a8aa
commit
67924ca473
1 changed files with 11 additions and 1 deletions
12
sys/build.rs
12
sys/build.rs
|
|
@ -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")]
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue