pineapple-src/externals/vcpkg/ports/orc/0003-dependencies-from-vcpkg.patch
2022-07-23 03:01:36 +02:00

163 lines
4.5 KiB
Diff
Executable File

diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt
index 3d4a162..6926bc3 100644
--- a/c++/src/CMakeLists.txt
+++ b/c++/src/CMakeLists.txt
@@ -230,12 +230,13 @@ endif(BUILD_LIBHDFSPP)
add_library (orc STATIC ${SOURCE_FILES})
target_link_libraries (orc
- protobuf
- zlib
- snappy
- lz4
- zstd
- ${LIBHDFSPP_LIBRARIES}
+ PRIVATE
+ protobuf::libprotobuf
+ ZLIB::ZLIB
+ Snappy::snappy
+ lz4::lz4
+ $<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>
+ ${LIBHDFSPP_LIBRARIES}
)
install(TARGETS orc DESTINATION lib)
diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
index 3a35325..56ffd74 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -59,8 +59,8 @@ endif ()
# ----------------------------------------------------------------------
# Snappy
-if (NOT "${SNAPPY_HOME}" STREQUAL "")
- find_package (Snappy REQUIRED)
+if (1)
+ find_package (Snappy CONFIG REQUIRED)
set(SNAPPY_VENDORED FALSE)
else ()
set(SNAPPY_HOME "${THIRDPARTY_DIR}/snappy_ep-install")
@@ -78,10 +78,6 @@ else ()
set(SNAPPY_VENDORED TRUE)
endif ()
-include_directories (SYSTEM ${SNAPPY_INCLUDE_DIR})
-add_library (snappy STATIC IMPORTED)
-set_target_properties (snappy PROPERTIES IMPORTED_LOCATION ${SNAPPY_STATIC_LIB})
-
if (SNAPPY_VENDORED)
add_dependencies (snappy snappy_ep)
if (INSTALL_VENDORED_LIBS)
@@ -93,7 +89,7 @@ endif ()
# ----------------------------------------------------------------------
# ZLIB
-if (NOT "${ZLIB_HOME}" STREQUAL "")
+if (1)
find_package (ZLIB REQUIRED)
set(ZLIB_VENDORED FALSE)
else ()
@@ -120,10 +116,6 @@ else ()
set(ZLIB_VENDORED TRUE)
endif ()
-include_directories (SYSTEM ${ZLIB_INCLUDE_DIR})
-add_library (zlib STATIC IMPORTED)
-set_target_properties (zlib PROPERTIES IMPORTED_LOCATION ${ZLIB_STATIC_LIB})
-
if (ZLIB_VENDORED)
add_dependencies (zlib zlib_ep)
if (INSTALL_VENDORED_LIBS)
@@ -135,8 +127,8 @@ endif ()
# ----------------------------------------------------------------------
# Zstd
-if (NOT "${ZSTD_HOME}" STREQUAL "")
- find_package (ZSTD REQUIRED)
+if (1)
+ find_package (zstd CONFIG REQUIRED)
set(ZSTD_VENDORED FALSE)
else ()
set(ZSTD_HOME "${THIRDPARTY_DIR}/zstd_ep-install")
@@ -169,10 +161,6 @@ else ()
set(ZSTD_VENDORED TRUE)
endif ()
-include_directories (SYSTEM ${ZSTD_INCLUDE_DIR})
-add_library (zstd STATIC IMPORTED)
-set_target_properties (zstd PROPERTIES IMPORTED_LOCATION ${ZSTD_STATIC_LIB})
-
if (ZSTD_VENDORED)
add_dependencies (zstd zstd_ep)
if (INSTALL_VENDORED_LIBS)
@@ -184,8 +172,8 @@ endif ()
# ----------------------------------------------------------------------
# LZ4
-if (NOT "${LZ4_HOME}" STREQUAL "")
- find_package (LZ4 REQUIRED)
+if (1)
+ find_package (lz4 CONFIG REQUIRED)
set(LZ4_VENDORED FALSE)
else ()
set(LZ4_PREFIX "${THIRDPARTY_DIR}/lz4_ep-install")
@@ -211,10 +199,6 @@ else ()
set(LZ4_VENDORED TRUE)
endif ()
-include_directories (SYSTEM ${LZ4_INCLUDE_DIR})
-add_library (lz4 STATIC IMPORTED)
-set_target_properties (lz4 PROPERTIES IMPORTED_LOCATION ${LZ4_STATIC_LIB})
-
if (LZ4_VENDORED)
add_dependencies (lz4 lz4_ep)
if (INSTALL_VENDORED_LIBS)
@@ -288,8 +272,8 @@ endif ()
# ----------------------------------------------------------------------
# Protobuf
-if (NOT "${PROTOBUF_HOME}" STREQUAL "")
- find_package (Protobuf REQUIRED)
+if (1)
+ find_package (Protobuf CONFIG REQUIRED)
set(PROTOBUF_VENDORED FALSE)
else ()
set(PROTOBUF_PREFIX "${THIRDPARTY_DIR}/protobuf_ep-install")
@@ -327,12 +311,6 @@ endif ()
include_directories (SYSTEM ${PROTOBUF_INCLUDE_DIR})
-add_library (protobuf STATIC IMPORTED)
-set_target_properties (protobuf PROPERTIES IMPORTED_LOCATION ${PROTOBUF_STATIC_LIB})
-
-add_library (protoc STATIC IMPORTED)
-set_target_properties (protoc PROPERTIES IMPORTED_LOCATION ${PROTOC_STATIC_LIB})
-
if (PROTOBUF_VENDORED)
add_dependencies (protoc protobuf_ep)
add_dependencies (protobuf protobuf_ep)
diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt
index f5a53ca..ec22e7a 100644
--- a/tools/src/CMakeLists.txt
+++ b/tools/src/CMakeLists.txt
@@ -51,7 +51,6 @@ add_executable (orc-metadata
target_link_libraries (orc-metadata
orc
- protobuf
${CMAKE_THREAD_LIBS_INIT}
)
@@ -92,7 +91,7 @@ target_link_libraries (csv-import
)
install(TARGETS
- orc-contents
- orc-metadata
- orc-statistics
- DESTINATION bin)
+ orc-scan
+ orc-memory
+ csv-import
+ DESTINATION tools/orc)