use rust_qt_binding_generator::*;
use std::path::PathBuf;

fn main()
{
   let out_dir = PathBuf::from(std::env::var("OUT_DIR").unwrap());

   let mut config = configuration::parse("bindings.json").unwrap();

   config.overwrite_implementation = true;
   config.cpp_file = out_dir.join("bindings.cc");
   config.rust.dir = out_dir;

   generate_bindings(&config).unwrap();

   let dst = cmake::Config::new(".").build();

   println!("cargo:rustc-link-search=native={}/lib", dst.display());
   println!("cargo:rustc-link-lib=dylib=maraiah-tycho-hermes");
}

// EOF
