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); + } } }