disables windows shader build on linux

This commit is contained in:
steffen 2024-12-16 20:23:58 +01:00
parent 7fe7015774
commit f16eab798d

View file

@ -17,12 +17,18 @@ fn main() {
println!("cargo::rerun-if-changed=shaders/frag_cuboid.spv"); println!("cargo::rerun-if-changed=shaders/frag_cuboid.spv");
println!("cargo::rerun-if-changed=shaders/vert_cuboid.spv"); println!("cargo::rerun-if-changed=shaders/vert_cuboid.spv");
if std::env::consts::OS == "windows" {
#[allow(unused_must_use)] #[allow(unused_must_use)]
std::fs::remove_file("shaders/geo_cube.spv"); std::fs::remove_file("shaders/geo_cube.spv");
#[allow(unused_must_use)]
std::fs::remove_file("shaders/frag_cube.spv"); std::fs::remove_file("shaders/frag_cube.spv");
#[allow(unused_must_use)]
std::fs::remove_file("shaders/vert_cube.spv"); std::fs::remove_file("shaders/vert_cube.spv");
#[allow(unused_must_use)]
std::fs::remove_file("shaders/geo_cuboid.spv"); std::fs::remove_file("shaders/geo_cuboid.spv");
#[allow(unused_must_use)]
std::fs::remove_file("shaders/frag_cuboid.spv"); std::fs::remove_file("shaders/frag_cuboid.spv");
#[allow(unused_must_use)]
std::fs::remove_file("shaders/vert_cuboid.spv"); std::fs::remove_file("shaders/vert_cuboid.spv");
#[warn(unused_must_use)] #[warn(unused_must_use)]
// probably need to check the os and have different versions // probably need to check the os and have different versions
@ -33,6 +39,7 @@ fn main() {
io::stderr().write_all(&output.stderr).unwrap(); io::stderr().write_all(&output.stderr).unwrap();
assert!(output.status.success()); assert!(output.status.success());
}
assert!(Path::new("shaders/geo_cube.spv").exists()); assert!(Path::new("shaders/geo_cube.spv").exists());
assert!(Path::new("shaders/frag_cube.spv").exists()); assert!(Path::new("shaders/frag_cube.spv").exists());