mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 08:39:01 +08:00
[zstd] update to 1.3.0
This commit is contained in:
parent
cedaaa1956
commit
42a425ced2
@ -1,3 +1,3 @@
|
||||
Source: zstd
|
||||
Version: 1.2.0
|
||||
Version: 1.3.0
|
||||
Description: Zstandard - Fast real-time compression algorithm http://www.zstd.net
|
||||
|
@ -1,100 +0,0 @@
|
||||
diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt
|
||||
index 5c4eca6..2f933e2 100644
|
||||
--- a/build/cmake/CMakeLists.txt
|
||||
+++ b/build/cmake/CMakeLists.txt
|
||||
@@ -15,8 +15,8 @@ LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add extra compilation flags
|
||||
#-----------------------------------------------------------------------------
|
||||
-INCLUDE(AddZstdCompilationFlags)
|
||||
-ADD_ZSTD_COMPILATION_FLAGS()
|
||||
+#INCLUDE(AddZstdCompilationFlags)
|
||||
+#ADD_ZSTD_COMPILATION_FLAGS() Combination of flags set there makes no sense & triggers compiler errors in release
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Options
|
||||
diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt
|
||||
index 429d494..4c13057 100644
|
||||
--- a/build/cmake/lib/CMakeLists.txt
|
||||
+++ b/build/cmake/lib/CMakeLists.txt
|
||||
@@ -90,37 +90,34 @@ IF (MSVC)
|
||||
ENDIF (MSVC)
|
||||
|
||||
# Split project to static and shared libraries build
|
||||
-ADD_LIBRARY(libzstd_shared SHARED ${Sources} ${Headers} ${PlatformDependResources})
|
||||
+IF (ZSTD_BUILD_SHARED)
|
||||
+ ADD_LIBRARY(libzstd_shared SHARED ${Sources} ${Headers} ${PlatformDependResources})
|
||||
+ENDIF(ZSTD_BUILD_SHARED)
|
||||
IF (ZSTD_BUILD_STATIC)
|
||||
ADD_LIBRARY(libzstd_static STATIC ${Sources} ${Headers})
|
||||
ENDIF (ZSTD_BUILD_STATIC)
|
||||
|
||||
# Add specific compile definitions for MSVC project
|
||||
IF (MSVC)
|
||||
- SET_PROPERTY(TARGET libzstd_shared APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_DLL_EXPORT=1;ZSTD_HEAPMODE=0;_CONSOLE;_CRT_SECURE_NO_WARNINGS")
|
||||
+ IF(ZSTD_BUILD_SHARED)
|
||||
+ SET_PROPERTY(TARGET libzstd_shared APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_DLL_EXPORT=1;ZSTD_HEAPMODE=0;_CONSOLE;_CRT_SECURE_NO_WARNINGS")
|
||||
+ ENDIF(ZSTD_BUILD_SHARED)
|
||||
IF (ZSTD_BUILD_STATIC)
|
||||
SET_PROPERTY(TARGET libzstd_static APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_HEAPMODE=0;_CRT_SECURE_NO_WARNINGS")
|
||||
ENDIF (ZSTD_BUILD_STATIC)
|
||||
ENDIF (MSVC)
|
||||
|
||||
# Define library base name
|
||||
-IF (MSVC)
|
||||
-
|
||||
- IF (CMAKE_SIZEOF_VOID_P MATCHES "8")
|
||||
- SET(LIBRARY_BASE_NAME "zstdlib_x64")
|
||||
- ELSE ()
|
||||
- SET(LIBRARY_BASE_NAME "zstdlib_x86")
|
||||
- ENDIF (CMAKE_SIZEOF_VOID_P MATCHES "8")
|
||||
-ELSE ()
|
||||
- SET(LIBRARY_BASE_NAME zstd)
|
||||
-ENDIF (MSVC)
|
||||
+SET(LIBRARY_BASE_NAME zstd)
|
||||
|
||||
# Define static and shared library names
|
||||
-SET_TARGET_PROPERTIES(
|
||||
- libzstd_shared
|
||||
- PROPERTIES
|
||||
- OUTPUT_NAME ${LIBRARY_BASE_NAME}
|
||||
- SOVERSION ${LIBVER_MAJOR}.${LIBVER_MINOR}.${LIBVER_RELEASE})
|
||||
+IF(ZSTD_BUILD_SHARED)
|
||||
+ SET_TARGET_PROPERTIES(
|
||||
+ libzstd_shared
|
||||
+ PROPERTIES
|
||||
+ OUTPUT_NAME ${LIBRARY_BASE_NAME}
|
||||
+ SOVERSION ${LIBVER_MAJOR}.${LIBVER_MINOR}.${LIBVER_RELEASE})
|
||||
+ENDIF(ZSTD_BUILD_SHARED)
|
||||
|
||||
IF (ZSTD_BUILD_STATIC)
|
||||
SET_TARGET_PROPERTIES(
|
||||
@@ -129,6 +126,15 @@ IF (ZSTD_BUILD_STATIC)
|
||||
OUTPUT_NAME ${LIBRARY_BASE_NAME})
|
||||
ENDIF (ZSTD_BUILD_STATIC)
|
||||
|
||||
+
|
||||
+INSTALL(FILES ${LIBRARY_DIR}/zstd.h ${LIBRARY_DIR}/deprecated/zbuff.h ${LIBRARY_DIR}/dictBuilder/zdict.h DESTINATION "include")
|
||||
+IF(ZSTD_BUILD_SHARED)
|
||||
+ INSTALL(TARGETS libzstd_shared RUNTIME DESTINATION "bin" ARCHIVE DESTINATION "lib" LIBRARY DESTINATION "lib")
|
||||
+ENDIF(ZSTD_BUILD_SHARED)
|
||||
+IF (ZSTD_BUILD_STATIC)
|
||||
+ INSTALL(TARGETS libzstd_static ARCHIVE DESTINATION "lib")
|
||||
+ENDIF (ZSTD_BUILD_STATIC)
|
||||
+
|
||||
IF (UNIX)
|
||||
# pkg-config
|
||||
SET(PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
@@ -142,12 +148,7 @@ IF (UNIX)
|
||||
COMMENT "Creating pkg-config file")
|
||||
|
||||
# install target
|
||||
- INSTALL(FILES ${LIBRARY_DIR}/zstd.h ${LIBRARY_DIR}/deprecated/zbuff.h ${LIBRARY_DIR}/dictBuilder/zdict.h DESTINATION "include")
|
||||
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/libzstd.pc" DESTINATION "share/pkgconfig")
|
||||
- INSTALL(TARGETS libzstd_shared LIBRARY DESTINATION "lib")
|
||||
- IF (ZSTD_BUILD_STATIC)
|
||||
- INSTALL(TARGETS libzstd_static ARCHIVE DESTINATION "lib")
|
||||
- ENDIF (ZSTD_BUILD_STATIC)
|
||||
|
||||
# uninstall target
|
||||
CONFIGURE_FILE(
|
@ -2,13 +2,10 @@ include(vcpkg_common_functions)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO facebook/zstd
|
||||
REF v1.2.0
|
||||
SHA512 b21910c6bdcfad3199c07b9f70f7c049062ebd1cce9249dd33c36153e29f24dd9e796ddbc2f37846b9f508c14b0d0f67651fd8d2bdce558128f20bdfff50a7df
|
||||
REF v1.3.0
|
||||
SHA512 5eb9e001e14d3342e76eb57b672c636fd56839ba8fc0ba9a751484ea93389c72c494ad2125dc2f9be1f72481f3af34568477123f7e9d3c7504e061e4c083cb30
|
||||
HEAD_REF dev)
|
||||
|
||||
vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-buildsystem.diff)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
set(ZSTD_STATIC 1)
|
||||
set(ZSTD_SHARED 0)
|
||||
@ -33,7 +30,7 @@ vcpkg_copy_pdbs()
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
foreach(HEADER zdict.h zstd.h)
|
||||
foreach(HEADER zdict.h zstd.h zstd_errors.h)
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/include/${HEADER} HEADER_CONTENTS)
|
||||
string(REPLACE "defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)" "1" HEADER_CONTENTS "${HEADER_CONTENTS}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/${HEADER} "${HEADER_CONTENTS}")
|
||||
|
Loading…
Reference in New Issue
Block a user