build.rs: simplify compile-shaders handling
This commit is contained in:
parent
f17800517e
commit
0564cd848d
5 changed files with 8 additions and 37 deletions
|
|
@ -1,8 +1,13 @@
|
|||
mod hash;
|
||||
|
||||
use {crate::vulkan::hash::unchanged, anyhow::bail, std::process::Command};
|
||||
use {
|
||||
crate::vulkan::hash::{ROOT, unchanged},
|
||||
anyhow::bail,
|
||||
std::process::Command,
|
||||
};
|
||||
|
||||
pub fn main() -> anyhow::Result<()> {
|
||||
println!("cargo:rerun-if-changed={}", ROOT);
|
||||
if !std::fs::exists("compile-shaders")? {
|
||||
return Ok(());
|
||||
}
|
||||
|
|
@ -15,7 +20,7 @@ pub fn main() -> anyhow::Result<()> {
|
|||
"--manifest-path",
|
||||
"compile-shaders/Cargo.toml",
|
||||
"-p",
|
||||
"compile-shaders-build-rs",
|
||||
"compile-shaders-compile",
|
||||
])
|
||||
.status()?;
|
||||
if !code.success() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue