29 lines
690 B
Rust
29 lines
690 B
Rust
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 mut config = cmake::Config::new(".");
|
|
|
|
if cfg!(debug_assertions) {
|
|
config.cxxflag("-DTYCHO_DEBUG_PRINT");
|
|
}
|
|
|
|
let destination = config.build();
|
|
|
|
println!("cargo:rustc-link-search=native={}/lib", destination.display());
|
|
println!("cargo:rustc-link-lib=dylib=maraiah-tycho-hermes");
|
|
}
|
|
|
|
// EOF
|