-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.rs
37 lines (30 loc) · 1.22 KB
/
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
34
35
36
37
use cmake;
fn main() {
let profile = std::env::var("PROFILE").unwrap();
let cmake_profile = "Release";
let mut dst = cmake::Config::new(".").profile(cmake_profile).build();
#[cfg(target_os = "macos")]
{
dst.push("build");
println!("cargo:rustc-link-search=native={}", dst.display());
println!("cargo:rustc-link-lib=dylib=c++");
println!("cargo:rustc-link-lib=framework=Foundation");
println!("cargo:rustc-link-lib=framework=AudioToolbox");
println!("cargo:rustc-link-lib=framework=AudioUnit");
println!("cargo:rustc-link-lib=framework=CoreAudio");
println!("cargo:rustc-link-lib=framework=CoreMIDI");
println!("cargo:rustc-link-lib=framework=AppKit");
println!("cargo:rustc-link-lib=framework=Accelerate");
}
#[cfg(target_os = "windows")]
{
dst.push("build");
dst.push(cmake_profile);
println!("cargo:rustc-link-search=native={}", dst.display());
println!("cargo:rustc-link-lib=ole32");
println!("cargo:rustc-link-lib=comctl32");
println!("cargo:rustc-link-lib=shell32");
}
println!("cargo:rustc-link-lib=static=JuceRustBindings");
// TODO: windows support pending
}