25 lines
694 B
Plaintext
25 lines
694 B
Plaintext
/*
|
|
* advotracker - Hotline tackingtool for Advocats
|
|
*
|
|
* Copyright 2021 Ralf Zerres <ralf.zerres@networkx.de>
|
|
* SPDX-License-Identifier: (0BSD or MIT)
|
|
*/
|
|
|
|
use std::env;
|
|
use std::error::Error;
|
|
#[cfg(target_os = "windows")]
|
|
use windres::Build;
|
|
|
|
fn main() -> Result<(), Box<dyn Error>> {
|
|
if env::var("CARGO_CFG_TARGET_FAMILY")? == "windows" {
|
|
let mut res = Build::new();
|
|
let target_env = std::env::var("CARGO_CFG_TARGET_ENV")?;
|
|
match target_env.as_str() {
|
|
"gnu" => res.set_icon("advotracker.rc"),
|
|
"msvc" => res.set_icon("advotracker.rc"),
|
|
_ => panic!("Unsupported env: {}", target_env),
|
|
};
|
|
res.compile()?
|
|
}
|
|
}
|