Blame SOURCES/0001-cmake_modules-FindZSTD.cmake.patch

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