diff --git a/Cargo.toml b/Cargo.toml index 5515c19..f77f8fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "virtual-avatar-connect" version = "0.3.0" edition = "2021" +build = "build.rs" [lib] name = "virtual_avatar_connect" @@ -63,3 +64,6 @@ windows = { version = "0.51.1", features = [ "Globalization", ] } winapi = { version = "0.3.9", features = ["wincodec"] } + +[target.'cfg(windows)'.build-dependencies] +winres = "0.1" diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..0182862 --- /dev/null +++ b/build.rs @@ -0,0 +1,7 @@ +fn main() { + if cfg!(target_os = "windows") { + let mut res = winres::WindowsResource::new(); + res.set_icon("icon.ico"); + res.compile().unwrap(); + } +} diff --git a/icon.ico b/icon.ico new file mode 100644 index 0000000..34941c3 Binary files /dev/null and b/icon.ico differ diff --git a/main.rc b/main.rc new file mode 100644 index 0000000..a1ec328 --- /dev/null +++ b/main.rc @@ -0,0 +1 @@ +1 ICON "icon.ico"