mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 01:16:31 +03:00
constants and basic header generation
This commit is contained in:
11
build.rs
11
build.rs
@@ -1,6 +1,7 @@
|
||||
extern crate bindgen;
|
||||
extern crate cc;
|
||||
|
||||
use std::env;
|
||||
|
||||
fn main() {
|
||||
let mut config = cc::Build::new();
|
||||
config.file("misc.h");
|
||||
@@ -28,4 +29,12 @@ fn main() {
|
||||
} else if std::env::var("TARGET").unwrap().contains("linux") {
|
||||
println!("cargo:rustc-link-lib=dylib=etpan");
|
||||
}
|
||||
|
||||
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
||||
|
||||
cbindgen::Builder::new()
|
||||
.with_crate(crate_dir)
|
||||
.generate()
|
||||
.expect("Unable to generate bindings")
|
||||
.write_to_file("deltachat.h");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user