veprbl commented on a change in pull request #7388:
URL: https://github.com/apache/arrow/pull/7388#discussion_r438472409



##########
File path: cpp/cmake_modules/FindZSTD.cmake
##########
@@ -21,13 +21,17 @@ endif()
 
 set(ZSTD_STATIC_LIB_SUFFIX 
"${ZSTD_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
 set(ZSTD_STATIC_LIB_NAME 
${CMAKE_STATIC_LIBRARY_PREFIX}zstd${ZSTD_STATIC_LIB_SUFFIX})
+if(ARROW_ZSTD_USE_SHARED)
+  set(ZSTD_LIB_NAMES 
"${CMAKE_SHARED_LIBRARY_PREFIX}zstd${CMAKE_SHARED_LIBRARY_SUFFIX}")
+else()
+  set(ZSTD_LIB_NAMES "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}")
+endif()
 
 # First, find via if specified ZTD_ROOT
 if(ZSTD_ROOT)
   message(STATUS "Using ZSTD_ROOT: ${ZSTD_ROOT}")
   find_library(ZSTD_LIB
-               NAMES zstd "${ZSTD_STATIC_LIB_NAME}" 
"lib${ZSTD_STATIC_LIB_NAME}"
-                     
"${CMAKE_SHARED_LIBRARY_PREFIX}zstd${CMAKE_SHARED_LIBRARY_SUFFIX}"
+               NAMES ${ZSTD_LIB_NAMES}

Review comment:
       It's probably because I intentionally removed plain "zstd" from the 
library names.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to