mirror of
https://github.com/cemu-project/vcpkg.git
synced 2024-11-23 11:19:43 +00:00
update to 1.18.1 and export blosc-config.cmake
This commit is contained in:
parent
941d546454
commit
f8c5785138
66
ports/blosc/0002-export-blosc-config.patch
Normal file
66
ports/blosc/0002-export-blosc-config.patch
Normal 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)
|
@ -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()`
|
||||
|
@ -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
|
||||
)
|
@ -3,11 +3,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 +35,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}
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user