-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.rs
29 lines (22 loc) · 919 Bytes
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use std::env;
#[cfg(all(feature = "nolib", feature = "MHLib"))]
compile_error!("features `nolib` and `MHLib` are mutually \
exclusive. If you want to use the `nolib` feature, you must disable \
default features `--no-default-features`.");
#[cfg(feature = "nolib")]
fn main() {}
#[cfg(feature = "MHLib")]
fn main() {
let target = env::var("TARGET").unwrap();
if target.contains("windows") {
println!("cargo:rustc-link-lib=mhlib64");
#[cfg(all(feature="MHLib", not(feature="MHLv3_1_0")))]
println!("cargo:rustc-link-search=native=c:\\Program Files\\PicoQuant\\MultiHarp-MHLibv30");
#[cfg(all(feature="MHLib", feature="MHLv3_1_0"))]
println!("cargo:rustc-link-search=native=c:\\Program Files\\PicoQuant\\MultiHarp-MHLibv31");
}
else {
println!("cargo:rustc-link-lib=mhlib64");
println!("cargo:rustc-link-search=native=/usr/local/lib");
}
}