2017-11-06 16:56:24 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Blosc/c-blosc
|
2020-02-11 08:08:57 +08:00
|
|
|
REF 30c55d6544613c846368de1faee420e56e992ffe # v1.17.1
|
|
|
|
SHA512 c4ed1492fd8733c6acabc973c58d6763e2a3a2bd7965fbf4d267169f5b03055eccdbe2723bc5d98636b039625a55609a092ed65de45d7a2b361347513cc83a98
|
2017-11-06 16:56:24 +08:00
|
|
|
HEAD_REF master
|
2019-08-12 03:26:23 +08:00
|
|
|
PATCHES
|
|
|
|
0001-find-deps.patch
|
2017-11-06 16:56:24 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
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}
|
2019-08-01 04:01:02 +08:00
|
|
|
PREFER_NINJA
|
2017-11-06 16:56:24 +08:00
|
|
|
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()
|
|
|
|
|
|
|
|
if (BLOSC_SHARED)
|
2019-06-18 02:31:14 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/blosc.dll")
|
|
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/blosc.dll ${CURRENT_PACKAGES_DIR}/bin/blosc.dll)
|
|
|
|
endif()
|
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/blosc.dll")
|
|
|
|
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/blosc.dll ${CURRENT_PACKAGES_DIR}/debug/bin/blosc.dll)
|
|
|
|
endif()
|
2017-11-06 16:56:24 +08:00
|
|
|
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)
|
|
|
|
|
2019-08-12 03:26:23 +08:00
|
|
|
file(COPY
|
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/FindBlosc.cmake"
|
|
|
|
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
|
|
|
|
)
|