From 4eaaca55cfee7fa9c8c7b00db9328cfc0168e2f1 Mon Sep 17 00:00:00 2001 From: Rudxain <76864299+Rudxain@users.noreply.github.com> Date: Thu, 24 Jul 2025 23:11:42 -0400 Subject: [PATCH] build: only rerun `build.rs` if manifest changes --- build.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build.rs b/build.rs index cc564fe..6998bc6 100644 --- a/build.rs +++ b/build.rs @@ -1,9 +1,9 @@ -use std::{env, error::Error}; +const META: &str = "resources/assets/manifest.rc"; -fn main() -> Result<(), Box> { - if env::var("CARGO_CFG_TARGET_FAMILY")? == "windows" { - embed_resource::compile("resources/assets/manifest.rc", embed_resource::NONE); +fn main() -> Result<(), Box> { + println!("cargo::rerun-if-changed={META}"); + if std::env::var("CARGO_CFG_TARGET_FAMILY")? == "windows" { + embed_resource::compile(META, embed_resource::NONE); } - Ok(()) }