Skip to content

Commit

Permalink
Copy the curl static library into /lib, so that cmake finds it.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidblewett committed Aug 25, 2023
1 parent 2a790e0 commit d166014
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions rdkafka-sys/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use std::borrow::Borrow;
use std::env;
use std::ffi::OsStr;
#[cfg(feature = "cmake-build")]
use std::fs;
use std::path::{Path, PathBuf};
use std::process::{self, Command};

Expand Down Expand Up @@ -234,6 +236,14 @@ fn build_librdkafka() {
config.cxxflag("-DCURL_STATICLIB");
config.cflag(format!("-I{}/include", curl_root));
config.cxxflag(format!("-I{}/include", curl_root));
config.cflag(format!("-L{}/lib", curl_root));
config.cxxflag(format!("-L{}/lib", curl_root));
//FIXME: Upstream should be copying this in their build.rs
fs::copy(
format!("{}/build/libcurl.a", curl_root),
format!("{}/lib/libcurl.a", curl_root),
)
.unwrap();
}
} else {
config.define("WITH_CURL", "0");
Expand Down

0 comments on commit d166014

Please sign in to comment.