12 lines
470 B
Rust
12 lines
470 B
Rust
fn main() {
|
|
println!("cargo:rerun-if-changed=assets/windows.rc");
|
|
println!("cargo:rerun-if-changed=assets/icon.ico");
|
|
|
|
// Check the target rather than the host so cross builds also receive the icon.
|
|
if std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("windows") {
|
|
embed_resource::compile("assets/windows.rc", embed_resource::NONE)
|
|
.manifest_required()
|
|
.expect("failed to embed the Windows application icon");
|
|
}
|
|
}
|