Re-run build script if CPAL_ASIO_DIR changes or the folder it points to does (#759)

* Re-run build script if the CPAL_ASIO_DIR env variable changes value

* Re-run build script if the SDK changes
This commit is contained in:
Julián Bayardo Spadafora 2023-03-10 03:43:43 -08:00 • committed by GitHub
parent e5ccc46afa
commit bd1ec6ae2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -3,6 +3,8 @@ 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) {