forked from jhasse/ears
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.rs
33 lines (27 loc) · 814 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
30
31
32
33
#[cfg(unix)]
extern crate pkg_config;
#[cfg(unix)]
fn main() {
for name in ["openal", "sndfile"].iter() {
let lib = pkg_config::Config::new()
.print_system_libs(false)
.find(name)
.unwrap();
for include in lib.include_paths.iter() {
println!("cargo:include={}", include.display());
}
for link in lib.link_paths.iter() {
println!("cargo:rustc-link-search=native={}", link.display());
}
}
}
#[cfg(all(windows, target_arch = "x86"))]
fn main() {
println!("cargo:rustc-link-search=native=C:\\msys32\\mingw64\\lib");
}
#[cfg(all(windows, target_arch = "x86_64"))]
fn main() {
println!("cargo:rustc-link-search=native=C:\\msys64\\mingw64\\lib");
}
#[cfg(all(not(windows), not(unix)))]
fn main() {}