From 013a26ad39043714041e7966232a243ace1348df Mon Sep 17 00:00:00 2001 From: forkless Date: Mon, 1 Jun 2026 05:49:06 +0200 Subject: [PATCH] Guard resource link for Windows target only --- build.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 53f694d..f9b3d26 100644 --- a/build.rs +++ b/build.rs @@ -19,6 +19,10 @@ fn main() { }; if compiled() { - println!("cargo:rustc-link-arg={}", res_path); + // Only link the resource on Windows targets + let target = std::env::var("TARGET").unwrap_or_default(); + if target.contains("windows") { + println!("cargo:rustc-link-arg={}", res_path); + } } }