Skip to content

Commit

Permalink
macos: detect DuckDB paths automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Oct 8, 2024
1 parent e73ceeb commit 13cb5ce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ext/arrow-duckdb/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
require "mkmf-gnome"
require "native-package-installer"

checking_for(checking_message("Homebrew")) do
homebrew = checking_for(checking_message("Homebrew")) do
case NativePackageInstaller::Platform.detect
when NativePackageInstaller::Platform::Homebrew
openssl_prefix = `brew --prefix openssl`.chomp
Expand All @@ -40,6 +40,10 @@
install_missing_native_package(debian: "libduckdb-dev",
redhat: "duckdb-devel",
homebrew: "duckdb") or exit(false)
if homebrew
$INCFLAGS << " -I" << File.join(`brew --prefix duckdb`.chomp, "include")
$LIBPATH |= [File.join(`brew --prefix duckdb`.chomp, "lib")]
end
have_library("duckdb") or exit(false)
end

Expand Down

0 comments on commit 13cb5ce

Please sign in to comment.