Skip to content

Commit

Permalink
Update build.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam Germain authored Oct 22, 2023
1 parent 3a44953 commit 61c1386
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
use std::env;

const CPAL_ASIO_DIR: &str = "CPAL_ASIO_DIR";

fn main() {
println!("cargo:rerun-if-env-changed={}", CPAL_ASIO_DIR);

// This avoids runtime errors on Android targets.
if std::env::var("TARGET").unwrap().contains("android") {
println!("cargo:rustc-link-lib=c++_shared");
}

// If ASIO directory isn't set silently return early
// otherwise set the asio config flag
match env::var(CPAL_ASIO_DIR) {
Expand Down

0 comments on commit 61c1386

Please sign in to comment.