slang-sys: Rebuild if SLANG_DIR env changes (#5)

This commit is contained in:
Bruce Mitchener 2024-11-30 17:59:21 +07:00 committed by GitHub
parent dbe941c55e
commit 4b4f1a93b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,6 +4,7 @@ use std::env;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
fn main() { fn main() {
println!("cargo:rerun-if-env-changed=SLANG_DIR");
let slang_dir = env::var("SLANG_DIR").map(PathBuf::from).expect( let slang_dir = env::var("SLANG_DIR").map(PathBuf::from).expect(
"Environment variable `SLANG_DIR` should be set to the directory of a Slang installation.", "Environment variable `SLANG_DIR` should be set to the directory of a Slang installation.",
); );