2017-05-25 07:30:01 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO apache/arrow
|
2022-02-19 06:33:15 +08:00
|
|
|
REF apache-arrow-7.0.0
|
|
|
|
SHA512 4df480e03dcd85c1c04f93ca55968cf64eb96b4bdb586d9ad3bd1d5ba6d9ec7cca34fefef43d84b921ba74ceaeb48f8ac9d1d1355f2408ebffd2b2a00a3da2bd
|
2017-05-25 07:30:01 +08:00
|
|
|
HEAD_REF master
|
2017-09-04 09:09:03 +08:00
|
|
|
PATCHES
|
2019-05-17 09:33:32 +08:00
|
|
|
all.patch
|
2021-07-23 04:45:35 +08:00
|
|
|
fix-dependencies.patch
|
|
|
|
)
|
|
|
|
|
2021-12-09 06:05:15 +08:00
|
|
|
file(REMOVE "${SOURCE_PATH}/cpp/cmake_modules/Findzstd.cmake"
|
|
|
|
"${SOURCE_PATH}/cpp/cmake_modules/FindBrotli.cmake"
|
|
|
|
"${SOURCE_PATH}/cpp/cmake_modules/Find-c-aresAlt.cmake"
|
|
|
|
"${SOURCE_PATH}/cpp/cmake_modules/FindLz4.cmake"
|
|
|
|
"${SOURCE_PATH}/cpp/cmake_modules/FindSnappy.cmake"
|
|
|
|
"${SOURCE_PATH}/cpp/cmake_modules/FindThrift.cmake"
|
|
|
|
"${SOURCE_PATH}/cpp/cmake_modules/FindGLOG.cmake"
|
|
|
|
"${SOURCE_PATH}/cpp/cmake_modules/Findutf8proc.cmake"
|
|
|
|
"${SOURCE_PATH}/cpp/cmake_modules/FindRapidJSONAlt.cmake"
|
|
|
|
"${SOURCE_PATH}/cpp/cmake_modules/FindgRPCAlt.cmake"
|
|
|
|
"${SOURCE_PATH}/cpp/cmake_modules/FindgflagsAlt.cmake"
|
2017-09-04 09:09:03 +08:00
|
|
|
)
|
|
|
|
|
2020-04-24 04:27:34 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-06-16 07:59:52 +08:00
|
|
|
FEATURES
|
|
|
|
csv ARROW_CSV
|
|
|
|
dataset ARROW_DATASET
|
|
|
|
filesystem ARROW_FILESYSTEM
|
|
|
|
flight ARROW_FLIGHT
|
|
|
|
json ARROW_JSON
|
|
|
|
orc ARROW_ORC
|
|
|
|
parquet ARROW_PARQUET
|
|
|
|
parquet PARQUET_REQUIRE_ENCRYPTION
|
2022-02-23 04:08:23 +08:00
|
|
|
plasma ARROW_PLASMA
|
2021-06-16 07:59:52 +08:00
|
|
|
s3 ARROW_S3
|
2020-04-24 04:27:34 +08:00
|
|
|
)
|
|
|
|
|
2021-06-16 07:59:52 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
|
|
|
|
set(MALLOC_OPTIONS -DARROW_JEMALLOC=OFF)
|
|
|
|
elseif("jemalloc" IN_LIST FEATURES)
|
|
|
|
set(MALLOC_OPTIONS -DARROW_JEMALLOC=ON)
|
|
|
|
else()
|
|
|
|
set(MALLOC_OPTIONS -DARROW_JEMALLOC=OFF)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND ("mimalloc" IN_LIST FEATURES))
|
|
|
|
set(MALLOC_OPTIONS ${MALLOC_OPTIONS} -DARROW_MIMALLOC=ON)
|
|
|
|
else()
|
|
|
|
set(MALLOC_OPTIONS ${MALLOC_OPTIONS} -DARROW_MIMALLOC=OFF)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" ARROW_BUILD_SHARED)
|
|
|
|
string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" ARROW_BUILD_STATIC)
|
|
|
|
string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" ARROW_DEPENDENCY_USE_SHARED)
|
|
|
|
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
set(THRIFT_USE_SHARED OFF)
|
|
|
|
else()
|
|
|
|
set(THRIFT_USE_SHARED ${ARROW_DEPENDENCY_USE_SHARED})
|
|
|
|
endif()
|
2020-11-13 06:28:59 +08:00
|
|
|
|
2021-11-19 12:39:34 +08:00
|
|
|
vcpkg_cmake_configure(
|
2021-12-09 06:05:15 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}/cpp"
|
2017-12-06 05:01:50 +08:00
|
|
|
OPTIONS
|
2020-04-24 04:27:34 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2021-06-16 07:59:52 +08:00
|
|
|
${MALLOC_OPTIONS}
|
2021-12-09 06:05:15 +08:00
|
|
|
${S3_OPTIONS}
|
2021-11-19 12:39:34 +08:00
|
|
|
-DCMAKE_SYSTEM_PROCESSOR=${VCPKG_TARGET_ARCHITECTURE}
|
2019-05-17 09:33:32 +08:00
|
|
|
-DARROW_BUILD_SHARED=${ARROW_BUILD_SHARED}
|
2021-06-16 07:59:52 +08:00
|
|
|
-DARROW_BUILD_STATIC=${ARROW_BUILD_STATIC}
|
|
|
|
-DARROW_BUILD_TESTS=OFF
|
|
|
|
-DARROW_DEPENDENCY_SOURCE=SYSTEM
|
|
|
|
-DARROW_DEPENDENCY_USE_SHARED=${ARROW_DEPENDENCY_USE_SHARED}
|
|
|
|
-DARROW_THRIFT_USE_SHARED=${THRIFT_USE_SHARED}
|
|
|
|
-DBUILD_WARNING_LEVEL=PRODUCTION
|
|
|
|
-DARROW_WITH_BROTLI=ON
|
2020-01-31 22:53:14 +08:00
|
|
|
-DARROW_WITH_BZ2=ON
|
|
|
|
-DARROW_WITH_LZ4=ON
|
|
|
|
-DARROW_WITH_SNAPPY=ON
|
2021-06-16 07:59:52 +08:00
|
|
|
-DARROW_WITH_ZLIB=ON
|
|
|
|
-DARROW_WITH_ZSTD=ON
|
|
|
|
-DZSTD_MSVC_LIB_PREFIX=
|
2021-12-09 06:05:15 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
ZSTD_MSVC_LIB_PREFIX
|
2017-05-25 07:30:01 +08:00
|
|
|
)
|
|
|
|
|
2021-11-19 12:39:34 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-05-25 07:30:01 +08:00
|
|
|
|
2019-01-17 02:29:07 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-12-09 06:05:15 +08:00
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/arrow_static.lib")
|
2019-05-17 09:33:32 +08:00
|
|
|
message(FATAL_ERROR "Installed lib file should be named 'arrow.lib' via patching the upstream build.")
|
2017-06-10 10:34:32 +08:00
|
|
|
endif()
|
2017-05-25 07:30:01 +08:00
|
|
|
|
2021-11-19 12:39:34 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/arrow)
|
2019-05-17 09:33:32 +08:00
|
|
|
|
2021-12-09 06:05:15 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/cmake")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake")
|
2019-04-05 12:11:46 +08:00
|
|
|
|
2022-01-08 05:57:16 +08:00
|
|
|
configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT} @ONLY)
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2021-12-09 06:05:15 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2017-05-25 07:30:01 +08:00
|
|
|
|
2022-01-08 05:57:16 +08:00
|
|
|
file(GLOB PARQUET_FILES ${CURRENT_PACKAGES_DIR}/share/${PORT}/Parquet*)
|
|
|
|
file(COPY ${PARQUET_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/share/parquet")
|
|
|
|
file(REMOVE_RECURSE ${PARQUET_FILES})
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/FindParquet.cmake ${CURRENT_PACKAGES_DIR}/share/parquet/FindParquet.cmake)
|
|
|
|
|
2021-12-09 06:05:15 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2021-10-28 06:19:28 +08:00
|
|
|
|
2022-02-23 04:08:23 +08:00
|
|
|
if ("plasma" IN_LIST FEATURES)
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES plasma-store-server AUTO_CLEAN)
|
|
|
|
endif ()
|
|
|
|
|
2021-10-28 06:19:28 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|