This is an automated email from the ASF dual-hosted git repository.

paleolimbot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-nanoarrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 4bf5a932 chore: Fall back on shared libzstd if libzstd_static is not 
available (#704)
4bf5a932 is described below

commit 4bf5a9322626e95e3717e43de7616c0a256179eb
Author: Dewey Dunnington <[email protected]>
AuthorDate: Thu Jan 9 11:52:48 2025 -0600

    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 (
    https://github.com/apache/arrow/pull/45205 ).
    
    Previous commits tested https://github.com/apache/arrow/pull/45205 by
    specifically pulling that branch instead of apache/arrow. When zstd is
    installed...the tests pass!
---
 CMakeLists.txt | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c77007d2..c689b5a3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -210,7 +210,14 @@ if(NANOARROW_IPC)
   if(NANOARROW_IPC_WITH_ZSTD)
     find_package(zstd REQUIRED)
     set(NANOARROW_IPC_EXTRA_FLAGS "-DNANOARROW_IPC_WITH_ZSTD")
-    set(NANOARROW_IPC_EXTRA_LIBS zstd::libzstd_static)
+
+    # libzstd_static is not available from conda
+    # This could be configurable if shared zstd is a must
+    if(TARGET zstd::libzstd_static)
+      set(NANOARROW_IPC_EXTRA_LIBS zstd::libzstd_static)
+    else()
+      set(NANOARROW_IPC_EXTRA_LIBS zstd::libzstd)
+    endif()
   endif()
 
   if(NOT NANOARROW_BUNDLE)

Reply via email to