Skip to content

Commit 72e16d0

Browse files
authored
Merge pull request #577 from mborst/support-bazel-build
Support bazel builds
2 parents 6997c64 + ca8ddb9 commit 72e16d0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

rdkafka-sys/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ fn main() {
7272
}
7373
}
7474
} else {
75+
// Ensure that we are in the right directory
76+
let rdkafkasys_root = Path::new("rdkafka-sys");
77+
if rdkafkasys_root.exists() {
78+
assert!(env::set_current_dir(&rdkafkasys_root).is_ok());
79+
}
7580
if !Path::new("librdkafka/LICENSE").exists() {
7681
eprintln!("Setting up submodules");
7782
run_command_or_fail("../", "git", &["submodule", "update", "--init"]);

0 commit comments

Comments
 (0)