Flatten create structure
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
24
advotracker_client/build.rs-windres
Normal file
24
advotracker_client/build.rs-windres
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* 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()?
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user