diff options
| author | here-mikelley <48072435+here-mikelley@users.noreply.github.com> | 2020-04-16 13:42:29 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-16 13:42:29 -0700 |
| commit | f68088b9ecc174773463fda7abb0b01754cfd375 (patch) | |
| tree | b6d50ef13b2f1721c0b9a0d0c8b674312f03d347 | |
| parent | d216948042d80d457c8643d19db0ba815d28b6fd (diff) | |
| download | vcpkg-f68088b9ecc174773463fda7abb0b01754cfd375.tar.gz vcpkg-f68088b9ecc174773463fda7abb0b01754cfd375.zip | |
[lz4] Fix for building Linux shared libraries (#10452)
* [lz4] Fix for building Linux shared libraries
* [lz4] Changes requested by maintainer
| -rw-r--r-- | ports/lz4/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | ports/lz4/CONTROL | 4 | ||||
| -rw-r--r-- | ports/lz4/portfile.cmake | 8 |
3 files changed, 5 insertions, 9 deletions
diff --git a/ports/lz4/CMakeLists.txt b/ports/lz4/CMakeLists.txt index b36a3574e..724b6fdaf 100644 --- a/ports/lz4/CMakeLists.txt +++ b/ports/lz4/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.0) project(lz4 C) -if(BUILD_SHARED_LIBS) +if(MSVC AND BUILD_SHARED_LIBS) add_definitions(-DLZ4_DLL_EXPORT) endif() add_definitions(-DXXH_NAMESPACE=LZ4_) diff --git a/ports/lz4/CONTROL b/ports/lz4/CONTROL index a00b88454..749586988 100644 --- a/ports/lz4/CONTROL +++ b/ports/lz4/CONTROL @@ -1,5 +1,5 @@ Source: lz4 -Version: 1.9.2 +Version: 1.9.2-1 Homepage: https://github.com/lz4/lz4 Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core. -Build-Depends: xxhash
\ No newline at end of file +Build-Depends: xxhash diff --git a/ports/lz4/portfile.cmake b/ports/lz4/portfile.cmake index 3468236bf..003f0591d 100644 --- a/ports/lz4/portfile.cmake +++ b/ports/lz4/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lz4/lz4 @@ -23,7 +21,7 @@ vcpkg_copy_pdbs() foreach(FILE lz4.h lz4frame.h) file(READ ${CURRENT_PACKAGES_DIR}/include/${FILE} LZ4_HEADER) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - string(REPLACE "defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)" "1" LZ4_HEADER "${LZ4_HEADER}") + string(REPLACE "defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)" "1 && defined(_MSC_VER)" LZ4_HEADER "${LZ4_HEADER}") else() string(REPLACE "defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)" "0" LZ4_HEADER "${LZ4_HEADER}") endif() @@ -34,6 +32,4 @@ vcpkg_fixup_cmake_targets() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -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(INSTALL ${SOURCE_PATH}/lib/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |
