We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 97408da + fef1e7a commit 9f52f50Copy full SHA for 9f52f50
build.rs
@@ -15,7 +15,20 @@ fn run(cmd: &mut Command) {
15
}
16
17
fn build_libsamplerate_unix(src: &PathBuf, dst: &PathBuf) {
18
- run(Command::new("cmake").args(&["-DCMAKE_C_FLAGS=-fPIC", diff_paths(&src, &dst).unwrap().to_str().unwrap()]).current_dir(&dst));
+ run(Command::new("cmake")
19
+ .args(&[
20
+ "-DCMAKE_C_FLAGS=-fPIC",
21
+ &format!(
22
+ "-DCMAKE_BUILD_TYPE={}",
23
+ if env::var("PROFILE").map(|x| x == "release").unwrap_or(false) {
24
+ "Release"
25
+ } else {
26
+ "Debug"
27
+ }
28
+ ),
29
+ diff_paths(&src, &dst).unwrap().to_str().unwrap(),
30
+ ])
31
+ .current_dir(&dst));
32
run(Command::new("make").args(&["samplerate"]).current_dir(&dst));
33
let shlib = src.join("src/.libs");
34
let _ = fs::copy(&shlib.join("libsamplerate.a"), &dst.join("libsamplerate.a"));
0 commit comments