2017-11-06 16:56:24 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Blosc/c-blosc
|
2019-05-22 12:00:24 +08:00
|
|
|
REF v1.16.3
|
|
|
|
SHA512 2ff67a6e955a641c3a2330140e5887d0ce3fdcbf6b205507798a4e848a35ba2e22bf8fd91133291bc73c4e48fb01c02139e47ab8e4774d0e2288872e625c9ffd
|
2017-11-06 16:56:24 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
set(BLOSC_STATIC ON)
|
|
|
|
set(BLOSC_SHARED OFF)
|
|
|
|
else()
|
|
|
|
set(BLOSC_STATIC OFF)
|
|
|
|
set(BLOSC_SHARED ON)
|
|
|
|
endif()
|
|
|
|
|
2018-05-16 11:39:10 +08:00
|
|
|
file(REMOVE_RECURSE ${SOURCE_PATH}/internal-complibs)
|
|
|
|
|
2017-11-06 16:56:24 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS -DPREFER_EXTERNAL_LZ4=ON
|
|
|
|
-DPREFER_EXTERNAL_SNAPPY=ON
|
|
|
|
-DPREFER_EXTERNAL_ZLIB=ON
|
|
|
|
-DPREFER_EXTERNAL_ZSTD=ON
|
|
|
|
-DBUILD_TESTS=OFF
|
|
|
|
-DBUILD_BENCHMARKS=OFF
|
|
|
|
-DBUILD_STATIC=${BLOSC_STATIC}
|
|
|
|
-DBUILD_SHARED=${BLOSC_SHARED}
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
if (BLOSC_SHARED)
|
|
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/blosc.dll ${CURRENT_PACKAGES_DIR}/debug/bin/blosc.dll)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/blosc.dll ${CURRENT_PACKAGES_DIR}/bin/blosc.dll)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# cleanup
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
|
|
|
# Handle copyright
|
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSES/BLOSC.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/blosc RENAME copyright)
|
|
|
|
|