summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkoverstreet <kent.overstreet@gmail.com>2024-01-21 07:08:23 -0500
committerGitHub <noreply@github.com>2024-01-21 07:08:23 -0500
commit3da247cd20da37a4d3f4d957a30293261c0e38e2 (patch)
tree8c2d984fe7186d313f8845a1f351c7b0f69e1c8e
parent5e224596cfdf9ad9413536482224e2fe79b9e387 (diff)
parent03122a58889dfe1a135ba1fe7437d481b5d8ef72 (diff)
Merge pull request #219 from xhebox/master
bch_bindgen: add liburcu paths by pkgconfig
-rw-r--r--bch_bindgen/build.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/bch_bindgen/build.rs b/bch_bindgen/build.rs
index 35f5d413..5395807c 100644
--- a/bch_bindgen/build.rs
+++ b/bch_bindgen/build.rs
@@ -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")