Skip to content

Commit

Permalink
Finish unix env
Browse files Browse the repository at this point in the history
  • Loading branch information
DoumanAsh committed Nov 12, 2018
1 parent 623cb56 commit 30d04e9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ fn build(out_dir: &std::path::Path) {
const CURRENT_DIR: &'static str = "opus";
use std::process::Command;

let res = Command::new("sh").arg("autogen.sh")
.current_dir(CURRENT_DIR)
.status()
.expect("To execute sh command");

if !res.success() {
panic!("Failed to autogen libopus");
}

let res = Command::new("sh").arg("configure")
.arg("--disable-shared")
.arg("--enable-static")
Expand Down Expand Up @@ -66,7 +75,7 @@ fn build(out_dir: &std::path::Path) {
panic!("Failed to install libopus");
}

println!("cargo:rustc-flags=-L native={}/lib -l static=opus", out_dir);
println!("cargo:rustc-flags=-L native={}/lib -l static=opus", out_dir.display());
}

#[cfg(not(feature = "build-bindgen"))]
Expand Down

0 comments on commit 30d04e9

Please sign in to comment.