[libarchive] Fix static linking dependencies (#16082)

This commit is contained in:
DDoSolitary 2021-04-20 08:14:07 +08:00 committed by GitHub
parent 1045e88e42
commit cc1aef5a12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 9 deletions

View File

@ -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}

View File

@ -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 \$<\$<NOT:\$<CONFIG:DEBUG>>:${ZSTD_LIBRARY_RELEASE}>)
endif()
if(ZSTD_LIBRARY_DEBUG)
list(APPEND interface_lib \$<\$<CONFIG:DEBUG>:${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)

View File

@ -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",

View File

@ -2942,7 +2942,7 @@
},
"libarchive": {
"baseline": "3.4.3",
"port-version": 4
"port-version": 5
},
"libass": {
"baseline": "0.15.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a8318f61dfe300b1b980b2ecaf295bd626572ad4",
"version-semver": "3.4.3",
"port-version": 5
},
{
"git-tree": "1246e0e0cd6bc4f0987fa5f5a130dc3b2e071285",
"version-semver": "3.4.3",