yumechi-no-kuni/yume-mods/cap-ng-sys/build.rs
eternal-flame-AD f4039d3671
migrate to podman & apparmor
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
2025-02-23 14:58:36 -06:00

18 lines
543 B
Rust

#[cfg(feature = "bindgen")]
use std::path::PathBuf;
fn main() {
println!("cargo:rustc-link-lib=cap-ng");
#[cfg(feature = "bindgen")]
let bindings = bindgen::Builder::default()
.header("bindings/cap_ng.h")
.default_enum_style(bindgen::EnumVariation::Consts)
.generate()
.expect("Unable to generate bindings");
#[cfg(feature = "bindgen")]
bindings
.write_to_file(PathBuf::from(std::env::var("OUT_DIR").unwrap()).join("cap_ng_sys.rs"))
.expect("Couldn't write bindings!");
}