You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

25 lines
590 B

fn main() {
let out_dir = std::env::var("OUT_DIR").unwrap();
for file in std::fs::read_dir("glsl").unwrap() {
let file = file.unwrap();
let path = file.path();
let file_name = path.file_name().unwrap();
let out = format!("{}/{}.o", out_dir, file_name.to_str().unwrap());
let path = path.to_str().unwrap();
println!("rerun-if-changed={}", path);
std::process::Command::new("glslc")
.arg("-O")
.arg("-o")
.arg(&out)
.arg("-std=450core")
.arg("--target-env=vulkan1.0")
.arg("-Werror")
.arg("-xglsl")
.arg(&path)
.status()
.unwrap();
}
}
// EOF