Skip to content

Commit 89638d9

Browse files
committed
Use installed ArrayFire libs by default
1 parent 19fa40c commit 89638d9

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

build.conf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
"use_lib": false,
3-
"lib_dir": "/usr/local/lib",
4-
"inc_dir": "/usr/local/include",
2+
"use_lib": true,
53

64
"build_type": "Release",
75
"build_threads": "4",

build.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ use std::convert::AsRef;
1515
struct Config {
1616
// Use the existing lib if it exists
1717
use_lib: bool,
18-
lib_dir: String,
19-
inc_dir: String,
2018

2119
// Build related
2220
build_type: String,
@@ -341,7 +339,9 @@ fn blob_backends(conf: &Config, build_dir: &std::path::PathBuf) -> (Vec<String>,
341339
let mut backends :Vec<String> = Vec::new();
342340

343341
if conf.use_lib {
344-
backend_dirs.push(conf.lib_dir.to_owned());
342+
let afpath = PathBuf::from(&env::var("AF_PATH").unwrap());
343+
let libpath = afpath.join("lib");
344+
backend_dirs.push(libpath.to_str().to_owned().unwrap().to_string());
345345
} else {
346346
backend_dirs.push(build_dir.join("package/lib").to_str().to_owned().unwrap().to_string());
347347
}

0 commit comments

Comments
 (0)