extern crate winres; use winres::WindowsResource; fn main() { if cfg!(target_os = "windows") { let mut res = WindowsResource::new(); res.set_icon("src/res/reimtris.ico"); res.compile().unwrap(); } }