mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-02 09:59:18 +08:00
59b58fc56d
* [arrow] Update Apache Arrow to 10.0.0 * Update versions * Simplify and make more robust * Use vcpkg_check_features() * Use lower case for CMake package name * Update version
103 lines
3.4 KiB
CMake
103 lines
3.4 KiB
CMake
vcpkg_download_distfile(
|
|
ARCHIVE_PATH
|
|
URLS "https://www.apache.org/dyn/closer.lua?action=download&filename=arrow/arrow-${VERSION}/apache-arrow-${VERSION}.tar.gz"
|
|
FILENAME apache-arrow-${VERSION}.tar.gz
|
|
SHA512 0856cfda98af8ae75d7011b4b2cb7305592dc16edeb27be8a845ee762cd1c4484997634e9bfe3fdc2a359fcfe0cbe036e0747ee0ea49677979920b95d1b4ced3
|
|
)
|
|
vcpkg_extract_source_archive(
|
|
SOURCE_PATH
|
|
ARCHIVE ${ARCHIVE_PATH}
|
|
PATCHES
|
|
brotli.patch
|
|
msvc-static-name.patch
|
|
processor-type.patch
|
|
thrift.patch
|
|
utf8proc.patch
|
|
)
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
csv ARROW_CSV
|
|
cuda ARROW_CUDA
|
|
dataset ARROW_DATASET
|
|
filesystem ARROW_FILESYSTEM
|
|
flight ARROW_FLIGHT
|
|
jemalloc ARROW_JEMALLOC
|
|
json ARROW_JSON
|
|
mimalloc ARROW_MIMALLOC
|
|
orc ARROW_ORC
|
|
parquet ARROW_PARQUET
|
|
parquet PARQUET_REQUIRE_ENCRYPTION
|
|
plasma ARROW_PLASMA
|
|
s3 ARROW_S3
|
|
)
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|
list(APPEND FEATURE_OPTIONS "-DARROW_USE_NATIVE_INT128=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)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}/cpp"
|
|
OPTIONS
|
|
${FEATURE_OPTIONS}
|
|
-DARROW_BUILD_SHARED=${ARROW_BUILD_SHARED}
|
|
-DARROW_BUILD_STATIC=${ARROW_BUILD_STATIC}
|
|
-DARROW_BUILD_TESTS=OFF
|
|
-DARROW_DEPENDENCY_SOURCE=SYSTEM
|
|
-DARROW_DEPENDENCY_USE_SHARED=${ARROW_DEPENDENCY_USE_SHARED}
|
|
-DARROW_PACKAGE_KIND=vcpkg
|
|
-DARROW_WITH_BROTLI=ON
|
|
-DARROW_WITH_BZ2=ON
|
|
-DARROW_WITH_LZ4=ON
|
|
-DARROW_WITH_SNAPPY=ON
|
|
-DARROW_WITH_ZLIB=ON
|
|
-DARROW_WITH_ZSTD=ON
|
|
-DBUILD_WARNING_LEVEL=PRODUCTION
|
|
-DCMAKE_SYSTEM_PROCESSOR=${VCPKG_TARGET_ARCHITECTURE}
|
|
-DZSTD_MSVC_LIB_PREFIX=
|
|
MAYBE_UNUSED_VARIABLES
|
|
ZSTD_MSVC_LIB_PREFIX
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/arrow_static.lib")
|
|
message(FATAL_ERROR "Installed lib file should be named 'arrow.lib' via patching the upstream build.")
|
|
endif()
|
|
|
|
if("parquet" IN_LIST FEATURES)
|
|
vcpkg_cmake_config_fixup(
|
|
PACKAGE_NAME parquet
|
|
CONFIG_PATH lib/cmake/Parquet
|
|
DO_NOT_DELETE_PARENT_CONFIG_PATH
|
|
)
|
|
endif()
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Arrow)
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
if("parquet" IN_LIST FEATURES)
|
|
file(READ "${CMAKE_CURRENT_LIST_DIR}/usage-parquet" usage-parquet)
|
|
file(APPEND "${CURRENT_PACKAGES_DIR}/share/${PORT}/usage" "${usage-parquet}")
|
|
endif()
|
|
|
|
if("example" IN_LIST FEATURES)
|
|
file(INSTALL "${SOURCE_PATH}/cpp/examples/minimal_build/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/example")
|
|
endif()
|
|
|
|
if("plasma" IN_LIST FEATURES)
|
|
vcpkg_copy_tools(TOOL_NAMES plasma-store-server AUTO_CLEAN)
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt" "${SOURCE_PATH}/NOTICE.txt")
|