fn main() {
println!("cargo:rustc-link-search=libs");
println!("cargo:rustc-link-lib=static=halconc");
// The bindgen::Builder is the main entry point
// to bindgen, and lets you build up options for
// the resulting bindings.
#[cfg(feature = "re_generate")]
{
let bindings = bindgen::Builder::default()
// The input header we would like to generate
// bindings for.
.header("header/wrapper.h")
// Tell cargo to invalidate the built crate whenever any of the
// included header files changed.
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
// Finish the builder and generate the bindings.
.generate()
// Unwrap the Result and panic on failure.
.expect("Unable to generate bindings");
bindings
.write_to_file("src/bindings.rs")
.expect("Couldn't write bindings!");
}
}