2018-11-06 01:15:17 +00:00
|
|
|
use std::env;
|
|
|
|
|
2020-02-24 06:40:25 +00:00
|
|
|
const CPAL_ASIO_DIR: &str = "CPAL_ASIO_DIR";
|
2018-11-06 01:15:17 +00:00
|
|
|
|
|
|
|
fn main() {
|
2020-01-20 19:35:23 +00:00
|
|
|
// If ASIO directory isn't set silently return early
|
2018-11-06 01:15:17 +00:00
|
|
|
// otherwise set the asio config flag
|
|
|
|
match env::var(CPAL_ASIO_DIR) {
|
|
|
|
Err(_) => return,
|
|
|
|
Ok(_) => println!("cargo:rustc-cfg=asio"),
|
|
|
|
};
|
2020-01-20 19:35:23 +00:00
|
|
|
}
|