build: only rerun build.rs if manifest changes

This commit is contained in:
Rudxain 2025-07-24 23:11:42 -04:00
commit 4eaaca55cf
No known key found for this signature in database
GPG key ID: 0DAC837DDEF8E96C

View file

@ -1,9 +1,9 @@
use std::{env, error::Error};
const META: &str = "resources/assets/manifest.rc";
fn main() -> Result<(), Box<dyn Error>> {
if env::var("CARGO_CFG_TARGET_FAMILY")? == "windows" {
embed_resource::compile("resources/assets/manifest.rc", embed_resource::NONE);
fn main() -> Result<(), Box<dyn std::error::Error>> {
println!("cargo::rerun-if-changed={META}");
if std::env::var("CARGO_CFG_TARGET_FAMILY")? == "windows" {
embed_resource::compile(META, embed_resource::NONE);
}
Ok(())
}