mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
35b34e8e42
The tdb build needs to know whether Samba is building with TDB bundled or not, otherwise linking will fail. Signed-off-by: David Mulder <dmulder@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
21 lines
621 B
Rust
21 lines
621 B
Rust
use std::env;
|
|
use std::path::PathBuf;
|
|
|
|
fn main() {
|
|
let header = "../../bin/default/include/config.h";
|
|
println!("cargo:rerun-if-changed={}", header);
|
|
let additions_header = "./additions.h";
|
|
println!("cargo:rerun-if-changed={}", additions_header);
|
|
|
|
let bindings = bindgen::Builder::default()
|
|
.header(additions_header)
|
|
.header(header)
|
|
.generate()
|
|
.expect("Failed generating config bindings!");
|
|
|
|
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
|
|
bindings
|
|
.write_to_file(out_path.join("bindings.rs"))
|
|
.expect("Couldn't write bindings!");
|
|
}
|