mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 18:43:01 +08:00
[lz4] update to 1.8.0
This commit is contained in:
parent
bd7cd7f56d
commit
1b304fff8c
@ -1,5 +1,5 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
cmake_minimum_required(VERSION 3.0)
|
||||||
project(lz4)
|
project(lz4 C)
|
||||||
|
|
||||||
if(BUILD_SHARED_LIBS)
|
if(BUILD_SHARED_LIBS)
|
||||||
add_definitions(-DLZ4_DLL_EXPORT)
|
add_definitions(-DLZ4_DLL_EXPORT)
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
Source: lz4
|
Source: lz4
|
||||||
Version: 1.7.5
|
Version: 1.8.0
|
||||||
Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core.
|
Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core.
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
diff --git a/lz4.h b/lz4.h
|
|
||||||
index 7420ad8..c1c3e56 100644
|
|
||||||
--- a/lz4.h
|
|
||||||
+++ b/lz4.h
|
|
||||||
@@ -73,6 +73,9 @@ extern "C" {
|
|
||||||
* LZ4_DLL_EXPORT :
|
|
||||||
* Enable exporting of functions when building a Windows DLL
|
|
||||||
*/
|
|
||||||
+
|
|
||||||
+#define LZ4_DLL_IMPORT 1
|
|
||||||
+
|
|
||||||
#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
|
|
||||||
# define LZ4LIB_API __declspec(dllexport)
|
|
||||||
#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)
|
|
||||||
diff --git a/lz4frame.h b/lz4frame.h
|
|
||||||
index 3104d2e..4442461 100644
|
|
||||||
--- a/lz4frame.h
|
|
||||||
+++ b/lz4frame.h
|
|
||||||
@@ -55,6 +55,9 @@ extern "C" {
|
|
||||||
* LZ4_DLL_EXPORT :
|
|
||||||
* Enable exporting of functions when building a Windows DLL
|
|
||||||
*/
|
|
||||||
+
|
|
||||||
+#define LZ4_DLL_IMPORT 1
|
|
||||||
+
|
|
||||||
#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
|
|
||||||
# define LZ4FLIB_API __declspec(dllexport)
|
|
||||||
#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)
|
|
@ -1,12 +1,10 @@
|
|||||||
|
|
||||||
include(vcpkg_common_functions)
|
include(vcpkg_common_functions)
|
||||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/lz4-1.7.5)
|
vcpkg_from_github(
|
||||||
vcpkg_download_distfile(ARCHIVE
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
URLS "https://github.com/lz4/lz4/archive/v1.7.5.zip"
|
REPO lz4/lz4
|
||||||
FILENAME "lz4-1.7.5.zip"
|
REF v1.8.0
|
||||||
SHA512 09968b67a5cd8555f6e1d95b99971a82d228c6d8d9f9dd9e9a33c9633bed9bcf1e370c2ff44e58c6ca72d103c149585b3e83061c690f3e857eb5f53d586f86a4)
|
SHA512 aea46d4a900a3ede7dd7b498ee938ecd98397d3277c5b3a85b4236a44777cba85cd68a2f32c993b872afda96c5dafe0cb3dd391101fe8181e17c9f48884c1535
|
||||||
|
HEAD_REF dev)
|
||||||
vcpkg_extract_source_archive(${ARCHIVE})
|
|
||||||
|
|
||||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||||
|
|
||||||
@ -19,12 +17,15 @@ vcpkg_configure_cmake(
|
|||||||
vcpkg_install_cmake()
|
vcpkg_install_cmake()
|
||||||
vcpkg_copy_pdbs()
|
vcpkg_copy_pdbs()
|
||||||
|
|
||||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
foreach(FILE lz4.h lz4frame.h)
|
||||||
vcpkg_apply_patches(
|
file(READ ${CURRENT_PACKAGES_DIR}/include/${FILE} LZ4_HEADER)
|
||||||
SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||||
PATCHES
|
string(REPLACE "defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)" "1" LZ4_HEADER "${LZ4_HEADER}")
|
||||||
${CMAKE_CURRENT_LIST_DIR}/auto-define-import-macro.patch)
|
else()
|
||||||
endif()
|
string(REPLACE "defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)" "0" LZ4_HEADER "${LZ4_HEADER}")
|
||||||
|
endif()
|
||||||
|
file(WRITE ${CURRENT_PACKAGES_DIR}/include/${FILE} "${LZ4_HEADER}")
|
||||||
|
endforeach()
|
||||||
|
|
||||||
file(COPY ${SOURCE_PATH}/lib/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/lz4)
|
file(COPY ${SOURCE_PATH}/lib/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/lz4)
|
||||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/lz4/LICENSE ${CURRENT_PACKAGES_DIR}/share/lz4/copyright)
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/lz4/LICENSE ${CURRENT_PACKAGES_DIR}/share/lz4/copyright)
|
||||||
|
Loading…
Reference in New Issue
Block a user