Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't let pkg-config add system lib dirs to the search path #441

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion curl-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ fn try_vcpkg() -> bool {

fn try_pkg_config() -> bool {
let mut cfg = pkg_config::Config::new();
cfg.print_system_libs(false);
cfg.cargo_metadata(false);
let lib = match cfg.probe("libcurl") {
Ok(lib) => lib,
Expand All @@ -498,7 +499,10 @@ fn try_pkg_config() -> bool {

// Re-find the library to print cargo's metadata, then print some extra
// metadata as well.
cfg.cargo_metadata(true).probe("libcurl").unwrap();
cfg.print_system_libs(false)
.cargo_metadata(true)
.probe("libcurl")
.unwrap();
for path in lib.include_paths.iter() {
println!("cargo:include={}", path.display());
}
Expand Down