Merge pull request #219 from xhebox/master

bch_bindgen: add liburcu paths by pkgconfig
This commit is contained in:
koverstreet 2024-01-21 07:08:23 -05:00 committed by GitHub
commit 3da247cd20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,6 +19,7 @@ fn main() {
.expect("ENV Var 'CARGO_MANIFEST_DIR' Expected")
.into();
let urcu = pkg_config::probe_library("liburcu").expect("Failed to find urcu lib");
let bindings = bindgen::builder()
.header(
top_dir
@ -27,6 +28,12 @@ fn main() {
.display()
.to_string(),
)
.clang_args(
urcu
.include_paths
.iter()
.map(|p| format!("-I{}", p.display())),
)
.clang_arg("-I..")
.clang_arg("-I../c_src")
.clang_arg("-I../include")