--- orc-rel-release-1.6.6/cmake_modules/FindZSTD.cmake.orig 2020-12-03 15:46:53.000000000 -0500
+++ orc-rel-release-1.6.6/cmake_modules/FindZSTD.cmake 2021-09-15 14:10:51.272792107 -0400
@@ -14,7 +14,7 @@
# ZSTD_INCLUDE_DIR: directory containing headers
# ZSTD_LIBS: directory containing zstd libraries
-# ZSTD_STATIC_LIB: path to libzstd.a
+# ZSTD_SHARED_LIB: path to libzstd.a
# ZSTD_FOUND: whether zstd has been found
if( NOT "${ZSTD_HOME}" STREQUAL "")
@@ -23,16 +23,16 @@
message (STATUS "ZSTD_HOME: ${ZSTD_HOME}")
-if (NOT ZSTD_STATIC_LIB_NAME)
- set (ZSTD_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}zstd)
-endif()
-
find_path (ZSTD_INCLUDE_DIR zstd.h HINTS
${_zstd_path}
NO_DEFAULT_PATH
PATH_SUFFIXES "include")
-find_library (ZSTD_LIBRARIES NAMES ${ZSTD_STATIC_LIB_NAME} HINTS
+if (NOT ZSTD_SHARED_LIB_NAME)
+ set (ZSTD_SHARED_LIB_NAME zstd)
+endif()
+
+find_library (ZSTD_LIBRARIES NAMES ${ZSTD_SHARED_LIB_NAME} HINTS
${_zstd_path}
PATH_SUFFIXES "lib")
@@ -41,14 +41,14 @@
get_filename_component (ZSTD_LIBS ${ZSTD_LIBRARIES} PATH)
set (ZSTD_HEADER_NAME zstd.h)
set (ZSTD_HEADER ${ZSTD_INCLUDE_DIR}/${ZSTD_HEADER_NAME})
- set (ZSTD_STATIC_LIB ${ZSTD_LIBS}/${ZSTD_STATIC_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX})
+ set (ZSTD_SHARED_LIB ${ZSTD_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${ZSTD_SHARED_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
else ()
set (ZSTD_FOUND FALSE)
endif ()
if (ZSTD_FOUND)
message (STATUS "Found the zstd header: ${ZSTD_HEADER}")
- message (STATUS "Found the zstd library: ${ZSTD_STATIC_LIB}")
+ message (STATUS "Found the zstd library: ${ZSTD_SHARED_LIB}")
else()
if (_ZSTD_path)
set (ZSTD_ERR_MSG "Could not find zstd. Looked in ${_zstd_path}.")
@@ -65,7 +65,7 @@
mark_as_advanced (
ZSTD_INCLUDE_DIR
- ZSTD_STATIC_LIB
+ ZSTD_SHARED_LIB
ZSTD_LIBS
ZSTD_LIBRARIES
)