Blob Blame History Raw
--- orc-rel-release-1.6.6/c++/src/orcConfig.cmake.orig	2021-09-02 08:12:02.402411800 -0400
+++ orc-rel-release-1.6.6/c++/src/orcConfig.cmake	2021-09-02 08:11:53.797563660 -0400
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/orcTargets.cmake")
--- orc-rel-release-1.6.6/c++/src/CMakeLists.txt.orig	2020-12-03 15:46:53.000000000 -0500
+++ orc-rel-release-1.6.6/c++/src/CMakeLists.txt	2021-09-15 14:47:07.195633659 -0400
@@ -227,7 +227,13 @@
   add_definitions(-DBUILD_LIBHDFSPP)
 endif(BUILD_LIBHDFSPP)
 
-add_library (orc STATIC ${SOURCE_FILES})
+add_library (orc SHARED ${SOURCE_FILES})
+
+set_target_properties(orc PROPERTIES
+  POSITION_INDEPENDENT_CODE ON
+  VERSION 1.6.6
+  SOVERSION 1
+)
 
 target_link_libraries (orc
   protobuf
@@ -238,4 +244,38 @@
   ${LIBHDFSPP_LIBRARIES}
   )
 
-install(TARGETS orc DESTINATION lib)
+install(TARGETS orc
+    EXPORT orcExports
+    DESTINATION ${LIB_INSTALL_DIR})
+
+include(CMakePackageConfigHelpers)
+write_basic_package_version_file(
+    "${CMAKE_CURRENT_BINARY_DIR}/orcConfigVersion.cmake"
+    VERSION ${orc_VERSION}
+    COMPATIBILITY SameMajorVersion
+    )
+
+# A Package Config file that works from the build directory
+export(EXPORT orcExports
+    FILE "${CMAKE_CURRENT_BINARY_DIR}/orcTargets.cmake"
+    NAMESPACE orc::
+    )
+configure_file(orcConfig.cmake
+    "${CMAKE_CURRENT_BINARY_DIR}/orcConfig.cmake"
+    COPYONLY
+    )
+
+# A Package Config file that works from the installation directory
+set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/orc)
+install(EXPORT orcExports
+    FILE orcTargets.cmake
+    NAMESPACE orc::
+    DESTINATION ${ConfigPackageLocation}
+    )
+install(FILES
+    orcConfig.cmake
+    "${CMAKE_CURRENT_BINARY_DIR}/orcConfigVersion.cmake"
+    DESTINATION ${ConfigPackageLocation}
+    )
+
+
--- orc-rel-release-1.6.6/cmake_modules/ThirdpartyToolchain.cmake.orig	2020-12-03 15:46:53.000000000 -0500
+++ orc-rel-release-1.6.6/cmake_modules/ThirdpartyToolchain.cmake	2021-09-15 14:21:07.299584448 -0400
@@ -79,8 +79,8 @@
 endif ()
 
 include_directories (SYSTEM ${SNAPPY_INCLUDE_DIR})
-add_library (snappy STATIC IMPORTED)
-set_target_properties (snappy PROPERTIES IMPORTED_LOCATION ${SNAPPY_STATIC_LIB})
+add_library (snappy SHARED IMPORTED)
+set_target_properties (snappy PROPERTIES IMPORTED_LOCATION ${SNAPPY_SHARED_LIB})
 
 if (SNAPPY_VENDORED)
   add_dependencies (snappy snappy_ep)
@@ -121,8 +121,8 @@
 endif ()
 
 include_directories (SYSTEM ${ZLIB_INCLUDE_DIR})
-add_library (zlib STATIC IMPORTED)
-set_target_properties (zlib PROPERTIES IMPORTED_LOCATION ${ZLIB_STATIC_LIB})
+add_library (zlib SHARED IMPORTED)
+set_target_properties (zlib PROPERTIES IMPORTED_LOCATION ${ZLIB_SHARED_LIB})
 
 if (ZLIB_VENDORED)
   add_dependencies (zlib zlib_ep)
@@ -170,8 +170,8 @@
 endif ()
 
 include_directories (SYSTEM ${ZSTD_INCLUDE_DIR})
-add_library (zstd STATIC IMPORTED)
-set_target_properties (zstd PROPERTIES IMPORTED_LOCATION ${ZSTD_STATIC_LIB})
+add_library (zstd SHARED IMPORTED)
+set_target_properties (zstd PROPERTIES IMPORTED_LOCATION ${ZSTD_SHARED_LIB})
 
 if (ZSTD_VENDORED)
   add_dependencies (zstd zstd_ep)
@@ -212,8 +212,8 @@
 endif ()
 
 include_directories (SYSTEM ${LZ4_INCLUDE_DIR})
-add_library (lz4 STATIC IMPORTED)
-set_target_properties (lz4 PROPERTIES IMPORTED_LOCATION ${LZ4_STATIC_LIB})
+add_library (lz4 SHARED IMPORTED)
+set_target_properties (lz4 PROPERTIES IMPORTED_LOCATION ${LZ4_SHARED_LIB})
 
 if (LZ4_VENDORED)
   add_dependencies (lz4 lz4_ep)
@@ -327,11 +327,11 @@
 
 include_directories (SYSTEM ${PROTOBUF_INCLUDE_DIR})
 
-add_library (protobuf STATIC IMPORTED)
-set_target_properties (protobuf PROPERTIES IMPORTED_LOCATION ${PROTOBUF_STATIC_LIB})
+add_library (protobuf SHARED IMPORTED)
+set_target_properties (protobuf PROPERTIES IMPORTED_LOCATION ${PROTOBUF_SHARED_LIB})
 
-add_library (protoc STATIC IMPORTED)
-set_target_properties (protoc PROPERTIES IMPORTED_LOCATION ${PROTOC_STATIC_LIB})
+add_library (protoc SHARED IMPORTED)
+set_target_properties (protoc PROPERTIES IMPORTED_LOCATION ${PROTOC_SHARED_LIB})
 
 if (PROTOBUF_VENDORED)
   add_dependencies (protoc protobuf_ep)
--- 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
 )
--- orc-rel-release-1.6.6/cmake_modules/FindSnappy.cmake.orig	2020-12-03 15:46:53.000000000 -0500
+++ orc-rel-release-1.6.6/cmake_modules/FindSnappy.cmake	2021-09-15 13:50:06.714446184 -0400
@@ -14,7 +14,7 @@
 
 # SNAPPY_INCLUDE_DIR: directory containing headers
 # SNAPPY_LIBS: directory containing snappy libraries
-# SNAPPY_STATIC_LIB: path to libsnappy.a
+# SNAPPY_SHARED_LIB: path to libsnappy.a
 # SNAPPY_FOUND: whether snappy has been found
 
 if( NOT "${SNAPPY_HOME}" STREQUAL "")
@@ -38,14 +38,14 @@
   set (SNAPPY_HEADER_NAME snappy.h)
   set (SNAPPY_HEADER ${SNAPPY_INCLUDE_DIR}/${SNAPPY_HEADER_NAME})
   set (SNAPPY_LIB_NAME snappy)
-  set (SNAPPY_STATIC_LIB ${SNAPPY_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${SNAPPY_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX})
+  set (SNAPPY_SHARED_LIB ${SNAPPY_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${SNAPPY_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
 else ()
   set (SNAPPY_FOUND FALSE)
 endif ()
 
 if (SNAPPY_FOUND)
   message (STATUS "Found the Snappy header: ${SNAPPY_HEADER}")
-  message (STATUS "Found the Snappy library: ${SNAPPY_STATIC_LIB}")
+  message (STATUS "Found the Snappy library: ${SNAPPY_SHARED_LIB}")
 else()
   if (_snappy_path)
     set (SNAPPY_ERR_MSG "Could not find Snappy. Looked in ${_snappy_path}.")
@@ -62,7 +62,7 @@
 
 mark_as_advanced (
   SNAPPY_INCLUDE_DIR
-  SNAPPY_STATIC_LIB
+  SNAPPY_SHARED_LIB
   SNAPPY_LIBS
   SNAPPY_LIBRARIES
 )
--- orc-rel-release-1.6.6/cmake_modules/FindLZ4.cmake.orig	2021-09-15 13:52:14.544322930 -0400
+++ orc-rel-release-1.6.6/cmake_modules/FindLZ4.cmake	2021-09-15 13:52:31.791036461 -0400
@@ -14,7 +14,7 @@
 
 # LZ4_INCLUDE_DIR: directory containing headers
 # LZ4_LIBS: directory containing LZ4 libraries
-# LZ4_STATIC_LIB: path to lz4.a
+# LZ4_SHARED_LIB: path to lz4.a
 # LZ4_FOUND: whether LZ4 has been found
 
 if( NOT "${LZ4_HOME}" STREQUAL "")
@@ -38,14 +38,14 @@
   set (LZ4_HEADER_NAME lz4.h)
   set (LZ4_HEADER ${LZ4_INCLUDE_DIR}/${LZ4_HEADER_NAME})
   set (LZ4_LIB_NAME lz4)
-  set (LZ4_STATIC_LIB ${LZ4_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${LZ4_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX})
+  set (LZ4_SHARED_LIB ${LZ4_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${LZ4_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
 else ()
   set (LZ4_FOUND FALSE)
 endif ()
 
 if (LZ4_FOUND)
   message (STATUS "Found the LZ4 header: ${LZ4_HEADER}")
-  message (STATUS "Found the LZ4 library: ${LZ4_STATIC_LIB}")
+  message (STATUS "Found the LZ4 library: ${LZ4_SHARED_LIB}")
 else()
   if (_lz4_path)
     set (LZ4_ERR_MSG "Could not find LZ4. Looked in ${_lz4_path}.")
@@ -62,7 +62,7 @@
 
 mark_as_advanced (
   LZ4_INCLUDE_DIR
-  LZ4_STATIC_LIB
+  LZ4_SHARED_LIB
   LZ4_LIBS
   LZ4_LIBRARIES
 )
--- orc-rel-release-1.6.6/cmake_modules/FindProtobuf.cmake.orig	2021-09-15 14:15:19.726344469 -0400
+++ orc-rel-release-1.6.6/cmake_modules/FindProtobuf.cmake	2021-09-15 14:16:22.330307272 -0400
@@ -15,8 +15,8 @@
 # PROTOBUF_FOUND is set if Protobuf is found
 # PROTOBUF_INCLUDE_DIR: directory containing headers
 # PROTOBUF_LIBS: directory containing Protobuf libraries
-# PROTOBUF_STATIC_LIB: location of protobuf.a
-# PROTOC_STATIC_LIB: location of protoc.a
+# PROTOBUF_SHARED_LIB: location of protobuf.a
+# PROTOC_SHARED_LIB: location of protoc.a
 # PROTOBUF_EXECUTABLE: location of protoc
 
 
@@ -54,16 +54,16 @@
   get_filename_component (PROTOBUF_LIBS ${PROTOBUF_LIBRARY} PATH)
   set (PROTOBUF_LIB_NAME protobuf)
   set (PROTOC_LIB_NAME protoc)
-  set (PROTOBUF_STATIC_LIB ${PROTOBUF_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${PROTOBUF_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX})
-  set (PROTOC_STATIC_LIB ${PROTOBUF_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${PROTOC_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX})
+  set (PROTOBUF_SHARED_LIB ${PROTOBUF_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${PROTOBUF_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+  set (PROTOC_SHARED_LIB ${PROTOBUF_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${PROTOC_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
 else ()
   set (PROTOBUF_FOUND FALSE)
 endif ()
 
 if (PROTOBUF_FOUND)
   message (STATUS "Found the Protobuf headers: ${PROTOBUF_INCLUDE_DIR}")
-  message (STATUS "Found the Protobuf library: ${PROTOBUF_STATIC_LIB}")
-  message (STATUS "Found the Protoc library: ${PROTOC_STATIC_LIB}")
+  message (STATUS "Found the Protobuf library: ${PROTOBUF_SHARED_LIB}")
+  message (STATUS "Found the Protoc library: ${PROTOC_SHARED_LIB}")
   message (STATUS "Found the Protoc executable: ${PROTOBUF_EXECUTABLE}")
 else()
   if (_protobuf_path)
@@ -82,6 +82,6 @@
 mark_as_advanced (
   PROTOBUF_INCLUDE_DIR
   PROTOBUF_LIBS
-  PROTOBUF_STATIC_LIB
-  PROTOC_STATIC_LIB
+  PROTOBUF_SHARED_LIB
+  PROTOC_SHARED_LIB
 )
--- orc-rel-release-1.6.6/cmake_modules/FindZLIB.cmake.orig	2021-09-15 14:20:04.485626684 -0400
+++ orc-rel-release-1.6.6/cmake_modules/FindZLIB.cmake	2021-09-15 14:20:33.448146843 -0400
@@ -14,7 +14,7 @@
 
 # ZLIB_INCLUDE_DIR: directory containing headers
 # ZLIB_LIBS: directory containing ZLIB libraries
-# ZLIB_STATIC_LIB: path to zlib.a
+# ZLIB_SHARED_LIB: path to zlib.a
 # ZLIB_FOUND: whether ZLIB has been found
 
 if( NOT "${ZLIB_HOME}" STREQUAL "")
@@ -28,11 +28,11 @@
   NO_DEFAULT_PATH
   PATH_SUFFIXES "include")
 
-if (NOT ZLIB_STATIC_LIB_NAME)
-  set (ZLIB_STATIC_LIB_NAME z)
+if (NOT ZLIB_SHARED_LIB_NAME)
+  set (ZLIB_SHARED_LIB_NAME z)
 endif()
 
-find_library (ZLIB_LIBRARIES NAMES ${ZLIB_STATIC_LIB_NAME} HINTS
+find_library (ZLIB_LIBRARIES NAMES ${ZLIB_SHARED_LIB_NAME} HINTS
   ${_zlib_path}
   PATH_SUFFIXES "lib")
 
@@ -41,14 +41,14 @@
   get_filename_component (ZLIB_LIBS ${ZLIB_LIBRARIES} PATH )
   set (ZLIB_HEADER_NAME zlib.h)
   set (ZLIB_HEADER ${ZLIB_INCLUDE_DIR}/${ZLIB_HEADER_NAME})
-  set (ZLIB_STATIC_LIB ${ZLIB_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${ZLIB_STATIC_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX})
+  set (ZLIB_SHARED_LIB ${ZLIB_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${ZLIB_SHARED_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
 else ()
   set (ZLIB_FOUND FALSE)
 endif ()
 
 if (ZLIB_FOUND)
   message (STATUS "Found the ZLIB header: ${ZLIB_HEADER}")
-  message (STATUS "Found the ZLIB library: ${ZLIB_STATIC_LIB}")
+  message (STATUS "Found the ZLIB library: ${ZLIB_SHARED_LIB}")
 else()
   if (_zlib_path)
     set (ZLIB_ERR_MSG "Could not find ZLIB. Looked in ${_zlib_path}.")
@@ -65,7 +65,7 @@
 
 mark_as_advanced (
   ZLIB_INCLUDE_DIR
-  ZLIB_STATIC_LIB
+  ZLIB_SHARED_LIB
   ZLIB_LIBS
   ZLIB_LIBRARIES
 )