From b56c15fbe0c6c80417a85128cab78a1968e0daeb Mon Sep 17 00:00:00 2001 From: Alex Page Date: Thu, 27 Jan 2022 21:30:11 -0500 Subject: [PATCH] Add icon to Windows build when cross-compiling --- build.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.rs b/build.rs index b5eecd2..19416ce 100644 --- a/build.rs +++ b/build.rs @@ -1,12 +1,12 @@ -#[cfg(windows)] +#[cfg(target_os = "windows")] extern crate winres; -#[cfg(windows)] +#[cfg(target_os = "windows")] fn main() { let mut res = winres::WindowsResource::new(); res.set_icon("icon.ico"); res.compile().unwrap(); } -#[cfg(unix)] +#[cfg(not(target_os = "windows"))] fn main() {}