23 lines
826 B
Rust
23 lines
826 B
Rust
//! Build script — embeds Windows application resources (icon, metadata).
|
|
|
|
fn main() {
|
|
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
|
|
|
|
if target_os == "windows" {
|
|
// rusty_link's build.rs only links stdc++ on linux — add it for windows too
|
|
println!("cargo:rustc-link-lib=stdc++");
|
|
println!("cargo:rustc-link-lib=ws2_32");
|
|
println!("cargo:rustc-link-lib=iphlpapi");
|
|
}
|
|
|
|
#[cfg(windows)]
|
|
{
|
|
let mut res = winres::WindowsResource::new();
|
|
res.set_icon("assets/Cagire.ico")
|
|
.set("ProductName", "Cagire")
|
|
.set("FileDescription", "Forth-based music sequencer")
|
|
.set("LegalCopyright", "Copyright (c) 2025 Raphaël Forment");
|
|
res.compile().expect("Failed to compile Windows resources");
|
|
}
|
|
}
|