Files
romulus-rs/build.rs
Alex Kerr cb52707b55 Initial
2024-01-29 00:04:21 +00:00

18 lines
704 B
Rust

fn main() {
// Instruct cargo to rerun the build script if any of the reference library
// is changed.
println!("cargo:rerun-if-changed=src/reference/Romulus-M");
// Use cmake to build the romulus reference library, and link to it.
// We need to link to both the .dll and the .lib file, which appear
// in different folders.
let dst = cmake::build("src/reference");
let mut libpath = dst.clone();
libpath.push("lib");
let mut binpath = dst;
binpath.push("bin");
println!("cargo:rustc-link-search=native={}", libpath.display());
println!("cargo:rustc-link-search=native={}", binpath.display());
println!("cargo:rustc-link-lib=romulus-m-static");
}