early-access version 2853
This commit is contained in:
52
externals/vcpkg/ports/blosc/0001-find-deps.patch
vendored
Executable file
52
externals/vcpkg/ports/blosc/0001-find-deps.patch
vendored
Executable file
@@ -0,0 +1,52 @@
|
||||
diff --git a/cmake/FindLZ4.cmake b/cmake/FindLZ4.cmake
|
||||
index e581a80..8ce17c5 100644
|
||||
--- a/cmake/FindLZ4.cmake
|
||||
+++ b/cmake/FindLZ4.cmake
|
||||
@@ -1,10 +1,13 @@
|
||||
-find_path(LZ4_INCLUDE_DIR lz4.h)
|
||||
+find_path(LZ4_INCLUDE_DIRS NAMES lz4.h)
|
||||
|
||||
-find_library(LZ4_LIBRARY NAMES lz4)
|
||||
+find_library(LZ4_LIBRARY_DEBUG NAMES lz4d)
|
||||
+find_library(LZ4_LIBRARY_RELEASE NAMES lz4)
|
||||
|
||||
-if (LZ4_INCLUDE_DIR AND LZ4_LIBRARY)
|
||||
- set(LZ4_FOUND TRUE)
|
||||
- message(STATUS "Found LZ4 library: ${LZ4_LIBRARY}")
|
||||
-else ()
|
||||
- message(STATUS "No LZ4 library found. Using internal sources.")
|
||||
-endif ()
|
||||
+include(SelectLibraryConfigurations)
|
||||
+select_library_configurations(LZ4)
|
||||
+
|
||||
+include(FindPackageHandleStandardArgs)
|
||||
+find_package_handle_standard_args(
|
||||
+ LZ4
|
||||
+ REQUIRED_VARS LZ4_LIBRARIES LZ4_INCLUDE_DIRS
|
||||
+)
|
||||
diff --git a/cmake/FindSnappy.cmake b/cmake/FindSnappy.cmake
|
||||
index 688d4d5..c8b9a05 100644
|
||||
--- a/cmake/FindSnappy.cmake
|
||||
+++ b/cmake/FindSnappy.cmake
|
||||
@@ -1,10 +1,13 @@
|
||||
-find_path(SNAPPY_INCLUDE_DIR snappy-c.h)
|
||||
+find_path(SNAPPY_INCLUDE_DIR snappy.h)
|
||||
|
||||
-find_library(SNAPPY_LIBRARY NAMES snappy)
|
||||
+find_library(SNAPPY_LIBRARY_DEBUG NAMES snappyd)
|
||||
+find_library(SNAPPY_LIBRARY_RELEASE NAMES snappy)
|
||||
|
||||
-if (SNAPPY_INCLUDE_DIR AND SNAPPY_LIBRARY)
|
||||
- set(SNAPPY_FOUND TRUE)
|
||||
- message(STATUS "Found SNAPPY library: ${SNAPPY_LIBRARY}")
|
||||
-else ()
|
||||
- message(STATUS "No snappy found. Using internal sources.")
|
||||
-endif ()
|
||||
+include(SelectLibraryConfigurations)
|
||||
+select_library_configurations(SNAPPY)
|
||||
+
|
||||
+include(FindPackageHandleStandardArgs)
|
||||
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(
|
||||
+ SNAPPY DEFAULT_MSG
|
||||
+ SNAPPY_LIBRARY SNAPPY_INCLUDE_DIR
|
||||
+)
|
||||
66
externals/vcpkg/ports/blosc/0002-export-blosc-config.patch
vendored
Executable file
66
externals/vcpkg/ports/blosc/0002-export-blosc-config.patch
vendored
Executable 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)
|
||||
45
externals/vcpkg/ports/blosc/portfile.cmake
vendored
Executable file
45
externals/vcpkg/ports/blosc/portfile.cmake
vendored
Executable file
@@ -0,0 +1,45 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Blosc/c-blosc
|
||||
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)
|
||||
set(BLOSC_STATIC ON)
|
||||
set(BLOSC_SHARED OFF)
|
||||
else()
|
||||
set(BLOSC_STATIC OFF)
|
||||
set(BLOSC_SHARED ON)
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE ${SOURCE_PATH}/internal-complibs)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
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()
|
||||
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)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
13
externals/vcpkg/ports/blosc/vcpkg.json
vendored
Executable file
13
externals/vcpkg/ports/blosc/vcpkg.json
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "blosc",
|
||||
"version-string": "1.18.1",
|
||||
"port-version": 4,
|
||||
"description": "A blocking, shuffling and loss-less compression library that can be faster than `memcpy()`",
|
||||
"homepage": "https://github.com/Blosc/c-blosc",
|
||||
"dependencies": [
|
||||
"lz4",
|
||||
"snappy",
|
||||
"zlib",
|
||||
"zstd"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user