From cc1aef5a12c0dd0a7b1310a3b7f21cc9debdff99 Mon Sep 17 00:00:00 2001 From: DDoSolitary Date: Tue, 20 Apr 2021 08:14:07 +0800 Subject: [libarchive] Fix static linking dependencies (#16082) --- ports/libarchive/portfile.cmake | 2 ++ ports/libarchive/vcpkg-cmake-wrapper.cmake.in | 8 +------- ports/libarchive/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/l-/libarchive.json | 5 +++++ 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ports/libarchive/portfile.cmake b/ports/libarchive/portfile.cmake index 4e6a5fd85..e441bdea2 100644 --- a/ports/libarchive/portfile.cmake +++ b/ports/libarchive/portfile.cmake @@ -42,6 +42,8 @@ else() endif() list(APPEND FEATURE_OPTIONS -DENABLE_ZLIB=ON) +# Needed for configure_file +set(ENABLE_ZLIB ON) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/libarchive/vcpkg-cmake-wrapper.cmake.in b/ports/libarchive/vcpkg-cmake-wrapper.cmake.in index 2e0ef0f9c..e0712d3e2 100644 --- a/ports/libarchive/vcpkg-cmake-wrapper.cmake.in +++ b/ports/libarchive/vcpkg-cmake-wrapper.cmake.in @@ -89,13 +89,7 @@ if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${interface_lib}) endif() if(@ENABLE_ZSTD@) - if(ZSTD_LIBRARY_RELEASE) - list(APPEND interface_lib \$<\$>:${ZSTD_LIBRARY_RELEASE}>) - endif() - if(ZSTD_LIBRARY_DEBUG) - list(APPEND interface_lib \$<\$:${ZSTD_LIBRARY_DEBUG}>) - endif() - set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${interface_lib}) + target_link_libraries(LibArchive::LibArchive INTERFACE zstd::libzstd_static) endif() if(@ENABLE_OPENSSL@) target_link_libraries(LibArchive::LibArchive INTERFACE OpenSSL::Crypto) diff --git a/ports/libarchive/vcpkg.json b/ports/libarchive/vcpkg.json index f70adef08..6258f226d 100644 --- a/ports/libarchive/vcpkg.json +++ b/ports/libarchive/vcpkg.json @@ -1,7 +1,7 @@ { "name": "libarchive", "version-semver": "3.4.3", - "port-version": 4, + "port-version": 5, "description": "Library for reading and writing streaming archives", "homepage": "https://github.com/libarchive/libarchive", "supports": "!uwp", diff --git a/versions/baseline.json b/versions/baseline.json index de2a50a7b..d95e74153 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2942,7 +2942,7 @@ }, "libarchive": { "baseline": "3.4.3", - "port-version": 4 + "port-version": 5 }, "libass": { "baseline": "0.15.0", diff --git a/versions/l-/libarchive.json b/versions/l-/libarchive.json index 4d3ad5108..16bd0563f 100644 --- a/versions/l-/libarchive.json +++ b/versions/l-/libarchive.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "a8318f61dfe300b1b980b2ecaf295bd626572ad4", + "version-semver": "3.4.3", + "port-version": 5 + }, { "git-tree": "1246e0e0cd6bc4f0987fa5f5a130dc3b2e071285", "version-semver": "3.4.3", -- cgit v1.2.3