Skip to content

Commit 4bf5a93

Browse files
authored
chore: Fall back on shared libzstd if libzstd_static is not available (#704)
This PR updates the CMake such that it works in conda after a `conda install zstd` (which doesn't provide `libzstd_static`, but does provide `libzstd`). This is needed to unskip the integration tests for zstd because the integration image uses conda ( apache/arrow#45205 ). Previous commits tested apache/arrow#45205 by specifically pulling that branch instead of apache/arrow. When zstd is installed...the tests pass!
1 parent ec67a72 commit 4bf5a93

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

CMakeLists.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,14 @@ if(NANOARROW_IPC)
210210
if(NANOARROW_IPC_WITH_ZSTD)
211211
find_package(zstd REQUIRED)
212212
set(NANOARROW_IPC_EXTRA_FLAGS "-DNANOARROW_IPC_WITH_ZSTD")
213-
set(NANOARROW_IPC_EXTRA_LIBS zstd::libzstd_static)
213+
214+
# libzstd_static is not available from conda
215+
# This could be configurable if shared zstd is a must
216+
if(TARGET zstd::libzstd_static)
217+
set(NANOARROW_IPC_EXTRA_LIBS zstd::libzstd_static)
218+
else()
219+
set(NANOARROW_IPC_EXTRA_LIBS zstd::libzstd)
220+
endif()
214221
endif()
215222

216223
if(NOT NANOARROW_BUNDLE)

0 commit comments

Comments
 (0)