Guard resource link for Windows target only

This commit is contained in:
2026-06-01 05:49:06 +02:00
parent 6174f53951
commit 013a26ad39
+5 -1
View File
@@ -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);
}
}
}