Skip to content

Commit 2b7e616

Browse files
committed
GH-47539: [C++] Detect snappy and bzip2 in Meson CI
1 parent 2b203ff commit 2b7e616

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

cpp/src/arrow/meson.build

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,16 @@ endif
223223

224224
if needs_bz2
225225
arrow_util_srcs += ['util/compression_bz2.cc']
226-
arrow_util_deps += dependency('bzip2')
226+
bzip2 = cpp_compiler.find_library(
227+
'bz2',
228+
has_headers: ['bzlib.h'],
229+
required: false,
230+
)
231+
if bzip2.found()
232+
arrow_util_deps += bzip2
233+
else
234+
arrow_util_deps += dependency('bzip2')
235+
endif
227236
endif
228237

229238
if needs_lz4
@@ -233,7 +242,7 @@ endif
233242

234243
if needs_snappy
235244
arrow_util_srcs += ['util/compression_snappy.cc']
236-
arrow_util_deps += dependency('snappy')
245+
arrow_util_deps += dependency('snappy', 'Snappy')
237246
endif
238247

239248
if needs_zlib

0 commit comments

Comments
 (0)