You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
549 B

extern crate bindgen;
use std::env;
use std::path::PathBuf;
fn main() {
let vst_include_path: String = env::var("VST_INCLUDE_DIR").expect("VST_INCLUDE_DIR not set");
let bindings = bindgen::Builder::default()
.clang_arg(format!("-I{}", vst_include_path))
.header("wrapper.h")
.generate()
.expect("Unable to generate bindings");
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
bindings
.write_to_file(out_path.join("bindings.rs"))
.expect("Failed to write bindings");
}