blob: 8375a72ec716ce3f94f03efee07ff67979c6f05f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
extern crate cbindgen;
use std::env;
fn main() {
let crate_dir = env!("CARGO_MANIFEST_DIR");
let config = cbindgen::Config::from_file("cbindgen.toml")
.expect("Failed to read 'cbindgen.toml'");
cbindgen::Builder::new()
.with_crate(crate_dir)
.with_config(config)
.generate()
.expect("Unable to generate bindings")
.write_to_file("dome_key_map.h");
// Link libdome_key_event_source_simulator.a
println!("cargo:rustc-link-lib=static=dome_key_event_source_simulator");
println!(
"cargo:rustc-link-search=native=./target/{profile}/deps",
profile=env::var("PROFILE").unwrap(),
);
}
|