Skip to content

Commit

Permalink
extconf.rb: locate zstd when using homebrew
Browse files Browse the repository at this point in the history
Fix compilation issues on my system.
  • Loading branch information
byroot committed Dec 2, 2024
1 parent 2583661 commit 8598b72
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ext/mysql2/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ def add_ssl_defines(header)
$LDFLAGS << " -L#{openssl_location}/lib" if openssl_location
end

if RUBY_PLATFORM =~ /darwin/ && system('command -v brew')
zstd_location = `brew --prefix zstd`.strip
unless zstd_location.empty?
$LIBPATH << "#{zstd_location}/lib"
end
end

### Find MySQL client library

# borrowed from mysqlplus
Expand Down

0 comments on commit 8598b72

Please sign in to comment.