Skip to content

Commit

Permalink
Merge pull request #112 from carlocab/pkg-config-macos
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Apr 23, 2023
2 parents 8ddbcd9 + a8229f2 commit 9908862
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ fn main() {
}

// Don't run pkg-config if we're linking statically (we'll build below) and
// also don't run pkg-config on macOS/FreeBSD/DragonFly. That'll end up printing
// also don't run pkg-config on FreeBSD/DragonFly. That'll end up printing
// `-L /usr/lib` which wreaks havoc with linking to an OpenSSL in /usr/local/lib
// (Homebrew, Ports, etc.)
// (Ports, etc.)
let want_static =
cfg!(feature = "static") || env::var("LIBZ_SYS_STATIC").unwrap_or(String::new()) == "1";
if !want_static &&
!target.contains("msvc") && // pkg-config just never works here
!(host_and_target_contain("apple") ||
host_and_target_contain("freebsd") ||
!(host_and_target_contain("freebsd") ||
host_and_target_contain("dragonfly"))
{
// Don't print system lib dirs to cargo since this interferes with other
Expand Down

0 comments on commit 9908862

Please sign in to comment.