Merge pull request #10816 from zi-m/blosc

[blosc] Update to 1.18.1
This commit is contained in:
Robert Schumacher 2020-04-16 12:21:54 -07:00 committed by GitHub
commit 2327468362
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 72 additions and 55 deletions

View File

@ -0,0 +1,66 @@
diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt
index f4e5c29..24641ad 100644
--- a/blosc/CMakeLists.txt
+++ b/blosc/CMakeLists.txt
@@ -122,14 +122,14 @@ endif (NOT DEACTIVATE_ZSTD)
# targets
if (BUILD_SHARED)
- add_library(blosc_shared SHARED ${SOURCES})
- set_target_properties(blosc_shared PROPERTIES OUTPUT_NAME blosc)
- set_target_properties(blosc_shared PROPERTIES
+ add_library(blosc SHARED ${SOURCES})
+ #set_target_properties(blosc_shared PROPERTIES OUTPUT_NAME blosc)
+ set_target_properties(blosc PROPERTIES
VERSION ${version_string}
SOVERSION 1 # Change this when an ABI change happens
)
set_property(
- TARGET blosc_shared
+ TARGET blosc
APPEND PROPERTY COMPILE_DEFINITIONS BLOSC_SHARED_LIBRARY)
endif()
@@ -192,8 +192,8 @@ if (BUILD_TESTS)
endif()
if (BUILD_SHARED)
- target_link_libraries(blosc_shared ${LIBS})
- target_include_directories(blosc_shared PUBLIC ${BLOSC_INCLUDE_DIRS})
+ target_link_libraries(blosc ${LIBS})
+ target_include_directories(blosc PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
endif()
if (BUILD_TESTS)
@@ -202,22 +202,24 @@ if (BUILD_TESTS)
endif()
if(BUILD_STATIC)
- add_library(blosc_static STATIC ${SOURCES})
- set_target_properties(blosc_static PROPERTIES OUTPUT_NAME blosc)
+ add_library(blosc STATIC ${SOURCES})
+ #set_target_properties(blosc_static PROPERTIES OUTPUT_NAME blosc)
if (MSVC)
- set_target_properties(blosc_static PROPERTIES PREFIX lib)
+ #set_target_properties(blosc_static PROPERTIES PREFIX lib)
endif()
- target_link_libraries(blosc_static ${LIBS})
- target_include_directories(blosc_static PUBLIC ${BLOSC_INCLUDE_DIRS})
+ target_link_libraries(blosc ${LIBS})
+ target_include_directories(blosc PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
endif(BUILD_STATIC)
# install
if(BLOSC_INSTALL)
install(FILES blosc.h blosc-export.h DESTINATION include COMPONENT DEV)
if(BUILD_SHARED)
- install(TARGETS blosc_shared LIBRARY DESTINATION ${lib_dir} ARCHIVE DESTINATION ${lib_dir} RUNTIME DESTINATION bin COMPONENT LIB)
+ install(TARGETS blosc EXPORT blosc-config RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
endif(BUILD_SHARED)
if(BUILD_STATIC)
- install(TARGETS blosc_static LIBRARY DESTINATION ${lib_dir} ARCHIVE DESTINATION ${lib_dir} RUNTIME DESTINATION bin COMPONENT DEV)
+ install(TARGETS blosc EXPORT blosc-config RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
endif(BUILD_STATIC)
endif(BLOSC_INSTALL)
+
+install(EXPORT blosc-config DESTINATION share/cmake/blosc)

View File

@ -1,5 +1,5 @@
Source: blosc
Version: 1.17.1
Version: 1.18.1-1
Build-Depends: lz4, snappy, zlib, zstd
Homepage: https://github.com/Blosc/c-blosc
Description: A blocking, shuffling and loss-less compression library that can be faster than `memcpy()`

View File

@ -1,33 +0,0 @@
include(FindPackageHandleStandardArgs)
find_path(
BLOSC_INCLUDE_DIRS
blosc.h
)
get_filename_component(_prefix_path ${BLOSC_INCLUDE_DIRS} PATH)
find_library(
BLOSC_LIBRARY_DEBUG
NAMES blosc
PATHS ${_prefix_path}/debug/lib
NO_DEFAULT_PATH
)
find_library(
SNAPPY_LIBRARY_RELEASE
NAMES blosc
PATHS ${_prefix_path}/lib
NO_DEFAULT_PATH
)
unset(_prefix_path)
include(SelectLibraryConfigurations)
select_library_configurations(blosc)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
blosc
REQUIRED_VARS BLOSC_LIBRARIES BLOSC_INCLUDE_DIRS
)

View File

@ -1,13 +1,12 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Blosc/c-blosc
REF 30c55d6544613c846368de1faee420e56e992ffe # v1.17.1
SHA512 c4ed1492fd8733c6acabc973c58d6763e2a3a2bd7965fbf4d267169f5b03055eccdbe2723bc5d98636b039625a55609a092ed65de45d7a2b361347513cc83a98
REF 9fae1c9acb659159321aca69aefcdbce663e2374 # v1.18.1
SHA512 6cc77832100041aca8f320e44aa803adc0d3344b52742b995a3155b953e5d149534de65c8244d964448150b73715a81f54285d7d01f1b45d7b10fe07f5bdb141
HEAD_REF master
PATCHES
0001-find-deps.patch
0002-export-blosc-config.patch
)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
@ -34,26 +33,11 @@ vcpkg_configure_cmake(
)
vcpkg_install_cmake()
if (BLOSC_SHARED)
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()
endif()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/blosc)
# 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)
file(COPY
"${CMAKE_CURRENT_LIST_DIR}/FindBlosc.cmake"
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
)

View File

@ -1303,7 +1303,7 @@ opentracing:arm-uwp=fail
opentracing:x64-uwp=fail
openvdb:x64-linux=ignore
openvdb:x64-osx=fail
openvdb:x64-windows-static=fail
#openvdb:x64-windows-static=fail # https://github.com/microsoft/vcpkg/pull/10816#issuecomment-613784827
openvpn3:x64-osx=fail
openvr:arm64-windows=fail
openvr:arm-uwp=fail