mirror of
https://github.com/project-slippi/cpal.git
synced 2025-10-06 00:02:40 +02:00
* Re-run build script if the CPAL_ASIO_DIR env variable changes value * Re-run build script if the SDK changes
15 lines
352 B
Rust
15 lines
352 B
Rust
use std::env;
|
|
|
|
const CPAL_ASIO_DIR: &str = "CPAL_ASIO_DIR";
|
|
|
|
fn main() {
|
|
println!("cargo:rerun-if-env-changed={}", CPAL_ASIO_DIR);
|
|
|
|
// If ASIO directory isn't set silently return early
|
|
// otherwise set the asio config flag
|
|
match env::var(CPAL_ASIO_DIR) {
|
|
Err(_) => {}
|
|
Ok(_) => println!("cargo:rustc-cfg=asio"),
|
|
};
|
|
}
|