Skip to content

Commit

Permalink
Merge pull request meh#84 from kornelski/dotconfigure
Browse files Browse the repository at this point in the history
Fix ./configure relating to wrong directory
  • Loading branch information
kornelski authored Aug 3, 2020
2 parents 580ae62 + 5462ccf commit 032a718
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ffmpeg-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,14 @@ fn switch(configure: &mut Command, feature: &str, name: &str) {
}

fn build() -> io::Result<()> {
let mut configure = Command::new("./configure");
configure.current_dir(&source());
let source_dir = source();

// Command's path is not relative to command's current_dir
let configure_path = source_dir.join("configure");
assert!(configure_path.exists());
let mut configure = Command::new(&configure_path);
configure.current_dir(&source_dir);

configure.arg(format!("--prefix={}", search().to_string_lossy()));

if env::var("TARGET").unwrap() != env::var("HOST").unwrap() {
Expand Down

0 comments on commit 032a718

Please sign in to comment.