Initial
This commit is contained in:
17
build.rs
Normal file
17
build.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
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");
|
||||
}
|
||||
Reference in New Issue
Block a user