2017-05-25 07:30:01 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2017-05-25 09:39:27 +08:00
|
|
|
if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
|
|
|
message(FATAL_ERROR "Apache Arrow only supports x64")
|
|
|
|
endif()
|
|
|
|
|
2017-05-25 07:30:01 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO apache/arrow
|
2019-04-05 12:11:46 +08:00
|
|
|
REF apache-arrow-0.13.0
|
|
|
|
SHA512 bbb14d11abf267a6902c7c9e0215ba7c5284f07482be2de42707145265d2809c89c2d4d8f8b918fdb8c33a5ecbd650875b987a1a694cdf653e766822be67a47d
|
2017-05-25 07:30:01 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
set(CPP_SOURCE_PATH "${SOURCE_PATH}/cpp")
|
|
|
|
|
2017-09-04 09:09:03 +08:00
|
|
|
vcpkg_apply_patches(
|
2019-01-17 02:29:07 +08:00
|
|
|
SOURCE_PATH ${CPP_SOURCE_PATH}
|
2017-09-04 09:09:03 +08:00
|
|
|
PATCHES
|
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/all.patch"
|
|
|
|
)
|
|
|
|
|
|
|
|
string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" ARROW_BUILD_SHARED)
|
|
|
|
string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" ARROW_BUILD_STATIC)
|
|
|
|
|
2019-01-17 02:29:07 +08:00
|
|
|
string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" IS_STATIC)
|
|
|
|
|
|
|
|
if (IS_STATIC)
|
|
|
|
set(PARQUET_ARROW_LINKAGE static)
|
2019-04-05 12:11:46 +08:00
|
|
|
set(BOOST_USE_SHARED off)
|
|
|
|
set(USE_STATIC_CRT on)
|
2019-01-17 02:29:07 +08:00
|
|
|
else()
|
|
|
|
set(PARQUET_ARROW_LINKAGE shared)
|
2019-04-05 12:11:46 +08:00
|
|
|
set(BOOST_USE_SHARED on)
|
|
|
|
set(USE_STATIC_CRT off)
|
2019-01-17 02:29:07 +08:00
|
|
|
endif()
|
|
|
|
|
2017-05-25 07:30:01 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${CPP_SOURCE_PATH}
|
2017-12-06 05:01:50 +08:00
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
2019-04-05 12:11:46 +08:00
|
|
|
-DARROW_DEPENDENCY_SOURCE=SYSTEM
|
2017-12-06 05:01:50 +08:00
|
|
|
-DARROW_BUILD_TESTS=off
|
2017-09-04 09:09:03 +08:00
|
|
|
-DBOOST_ROOT=${CURRENT_INSTALLED_DIR}
|
2019-01-17 02:29:07 +08:00
|
|
|
-DARROW_PARQUET=ON
|
2017-09-04 09:09:03 +08:00
|
|
|
-DARROW_BUILD_STATIC=${ARROW_BUILD_STATIC}
|
|
|
|
-DARROW_BUILD_SHARED=${ARROW_BUILD_SHARED}
|
2019-01-17 02:29:07 +08:00
|
|
|
-DBUILD_STATIC=${ARROW_BUILD_STATIC}
|
|
|
|
-DBUILD_SHARED=${ARROW_BUILD_SHARED}
|
|
|
|
-DPARQUET_ARROW_LINKAGE=${PARQUET_ARROW_LINKAGE}
|
2019-04-05 12:11:46 +08:00
|
|
|
-DARROW_BOOST_USE_SHARED=${BOOST_USE_SHARED}
|
|
|
|
-DARROW_USE_STATIC_CRT=${USE_STATIC_CRT}
|
|
|
|
-DARROW_GFLAGS_USE_SHARED=off
|
|
|
|
-DARROW_JEMALLOC=off
|
2017-05-25 07:30:01 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2019-01-17 02:29:07 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/arrow_static.lib ${CURRENT_PACKAGES_DIR}/lib/arrow.lib)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/arrow_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/arrow.lib)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
else()
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/arrow_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/arrow_static.lib)
|
|
|
|
endif()
|
2017-06-10 10:34:32 +08:00
|
|
|
endif()
|
2017-05-25 07:30:01 +08:00
|
|
|
|
2019-04-05 12:11:46 +08:00
|
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/arrow/cmake)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/arrow/arrowConfig.cmake ${CURRENT_PACKAGES_DIR}/share/arrow/cmake/arrowConfig.cmake)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/arrow/arrowConfigVersion.cmake ${CURRENT_PACKAGES_DIR}/share/arrow/cmake/arrowConfigVersion.cmake)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/arrow/arrowTargets-release.cmake ${CURRENT_PACKAGES_DIR}/share/arrow/cmake/arrowTargets-release.cmake)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/arrow/arrowTargets.cmake ${CURRENT_PACKAGES_DIR}/share/arrow/cmake/arrowTargets.cmake)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/arrow/arrowTargets-debug.cmake ${CURRENT_PACKAGES_DIR}/share/arrow/cmake/arrowTargets-debug.cmake)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
|
|
|
|
2017-05-25 07:30:01 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/arrow RENAME copyright)
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|