Files
cpal/build.rs

15 lines
352 B
Rust
Raw Permalink Normal View History

2018-11-06 12:15:17 +11:00
use std::env;
const CPAL_ASIO_DIR: &str = "CPAL_ASIO_DIR";
2018-11-06 12:15:17 +11:00
fn main() {
println!("cargo:rerun-if-env-changed={}", CPAL_ASIO_DIR);
// If ASIO directory isn't set silently return early
2018-11-06 12:15:17 +11:00
// otherwise set the asio config flag
match env::var(CPAL_ASIO_DIR) {
2020-07-21 17:59:53 -07:00
Err(_) => {}
2018-11-06 12:15:17 +11:00
Ok(_) => println!("cargo:rustc-cfg=asio"),
};
}