lemur/build.rs

23 lines
694 B
Rust
Raw Normal View History

2024-12-19 00:40:06 +00:00
use std::{error::Error, path::Path};
fn main() -> Result<(), Box<dyn Error>> {
if std::env::var("CARGO_CFG_TARGET_OS")? == "windows" {
let mut res = winresource::WindowsResource::new();
res.set_icon("assets/lemur.ico");
res.compile()?;
}
2024-11-02 20:18:41 +00:00
2024-11-03 16:32:53 +00:00
println!("cargo::rerun-if-changed=shrooms-vb-core");
2024-11-02 20:18:41 +00:00
cc::Build::new()
.include(Path::new("shrooms-vb-core/core"))
2024-11-03 16:32:53 +00:00
.opt_level(2)
2024-11-02 20:18:41 +00:00
.flag_if_supported("-fno-strict-aliasing")
2024-11-15 02:02:56 +00:00
.define("VB_LITTLE_ENDIAN", None)
.define("VB_SIGNED_PROPAGATE", None)
.define("VB_DIV_GENERIC", None)
2024-11-02 20:18:41 +00:00
.file(Path::new("shrooms-vb-core/core/vb.c"))
.compile("vb");
2024-12-19 00:40:06 +00:00
Ok(())
2024-11-02 20:18:41 +00:00
}