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"); }