forked from GuillaumeGomez/sysinfo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.rs
20 lines (18 loc) · 762 Bytes
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
fn main() {
let is_apple = std::env::var("TARGET")
.map(|t| t.contains("-apple"))
.unwrap_or(false);
let is_ios = std::env::var("CARGO_CFG_TARGET_OS")
.map(|s| s == "ios")
.unwrap_or(false);
if is_apple {
if !is_ios {
// DiskArbitration is not available on iOS: https://developer.apple.com/documentation/diskarbitration
println!("cargo:rustc-link-lib=framework=DiskArbitration");
// IOKit is not available on iOS: https://developer.apple.com/documentation/iokit
println!("cargo:rustc-link-lib=framework=IOKit");
}
println!("cargo:rustc-link-lib=framework=Foundation");
println!("cargo:rustc-link-lib=framework=CoreFoundation");
}
}