1 2 3 4 5 6 7
fn main() { if std::env::var("CARGO_CFG_TARGET_OS").unwrap() == "windows" { let mut res = winresource::WindowsResource::new(); res.set_icon("dstimer.ico"); res.compile().unwrap(); } }