Fix target_link_libraries on repeated inclusion of wrappers (#19120)

* Fix repeated inclusion of wrappers

* x-add-version
This commit is contained in:
Kai Pastor 2021-09-02 22:21:52 +02:00 committed by GitHub
parent bff0e8fc31
commit 9f73bc1a0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 69 additions and 34 deletions

View File

@ -10,7 +10,7 @@ if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
Iconv::Iconv
)
if(@EXIV2_ENABLE_NLS@)
target_link_libraries(exiv2lib INTERFACE ${Intl_LIBRARIES})
set_property(TARGET exiv2lib APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${Intl_LIBRARIES})
endif()
endif()
endif()

View File

@ -1,7 +1,7 @@
{
"name": "exiv2",
"version": "0.27.4",
"port-version": 1,
"port-version": 2,
"description": "Image metadata library and tools",
"homepage": "https://www.exiv2.org",
"supports": "!uwp",

View File

@ -56,7 +56,7 @@ function(_gdal_add_dependency target package)
endif()
if(dependency)
if(TARGET GDAL::GDAL) # CMake 3.14
target_link_libraries(GDAL::GDAL INTERFACE ${dependency})
set_property(TARGET GDAL::GDAL APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${dependency})
endif()
if(NOT GDAL_LIBRARIES STREQUAL "GDAL::GDAL")
set(GDAL_LIBRARIES "${GDAL_LIBRARIES};${dependency}" PARENT_SCOPE)

View File

@ -1,7 +1,7 @@
{
"name": "gdal",
"version-semver": "3.2.2",
"port-version": 3,
"port-version": 4,
"description": "The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data",
"homepage": "https://gdal.org",
"supports": "!arm",

View File

@ -65,19 +65,19 @@ if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
if(TARGET LibArchive::LibArchive)
if(@ENABLE_BZip2@)
target_link_libraries(LibArchive::LibArchive INTERFACE BZip2::BZip2)
set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES BZip2::BZip2)
endif()
if(@ENABLE_ZLIB@)
target_link_libraries(LibArchive::LibArchive INTERFACE ZLIB::ZLIB)
set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB)
endif()
if(@ENABLE_LIBXML2@)
target_link_libraries(LibArchive::LibArchive INTERFACE LibXml2::LibXml2)
set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES LibXml2::LibXml2)
endif()
if(@ENABLE_LZ4@)
target_link_libraries(LibArchive::LibArchive INTERFACE lz4::lz4)
set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES lz4::lz4)
endif()
if(@ENABLE_LZMA@)
target_link_libraries(LibArchive::LibArchive INTERFACE LibLZMA::LibLZMA)
set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES LibLZMA::LibLZMA)
endif()
if(@ENABLE_LZO@)
if(LZO_LIBRARY_RELEASE)
@ -89,10 +89,10 @@ if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${interface_lib})
endif()
if(@ENABLE_ZSTD@)
target_link_libraries(LibArchive::LibArchive INTERFACE zstd::libzstd_static)
set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES zstd::libzstd_static)
endif()
if(@ENABLE_OPENSSL@)
target_link_libraries(LibArchive::LibArchive INTERFACE OpenSSL::Crypto)
set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES OpenSSL::Crypto)
endif()
endif()
endif()

View File

@ -1,7 +1,7 @@
{
"name": "libarchive",
"version-semver": "3.4.3",
"port-version": 7,
"port-version": 8,
"description": "Library for reading and writing streaming archives",
"homepage": "https://github.com/libarchive/libarchive",
"supports": "!uwp",

View File

@ -1,5 +0,0 @@
Source: libiconv
Version: 1.16
Port-Version: 10
Homepage: https://www.gnu.org/software/libiconv/
Description: GNU Unicode text conversion

View File

@ -0,0 +1,7 @@
{
"name": "libiconv",
"version": "1.16",
"port-version": 11,
"description": "GNU Unicode text conversion",
"homepage": "https://www.gnu.org/software/libiconv/"
}

View File

@ -1,4 +0,0 @@
Source: libuv
Version: 1.41.0
Homepage: https://github.com/libuv/libuv
Description: libuv is a multi-platform support library with a focus on asynchronous I/O.

View File

@ -3,14 +3,14 @@ _find_package(${ARGS})
if(WIN32)
list(APPEND LibUV_LIBRARIES iphlpapi psapi shell32 userenv ws2_32)
if(TARGET LibUV::LibUV)
target_link_libraries(LibUV::LibUV INTERFACE iphlpapi psapi shell32 userenv ws2_32)
set_property(TARGET LibUV::LibUV APPEND PROPERTY INTERFACE_LINK_LIBRARIES iphlpapi psapi shell32 userenv ws2_32)
endif()
endif()
include(CMakeFindDependencyMacro)
find_dependency(Threads)
list(APPEND LibUV_LIBRARIES Threads::Threads)
if(TARGET LibUV::LibUV)
target_link_libraries(LibUV::LibUV INTERFACE Threads::Threads)
set_property(TARGET LibUV::LibUV APPEND PROPERTY INTERFACE_LINK_LIBRARIES Threads::Threads)
endif()

7
ports/libuv/vcpkg.json Normal file
View File

@ -0,0 +1,7 @@
{
"name": "libuv",
"version": "1.41.0",
"port-version": 1,
"description": "libuv is a multi-platform support library with a focus on asynchronous I/O.",
"homepage": "https://github.com/libuv/libuv"
}

View File

@ -31,18 +31,18 @@ if(LibXml2_FOUND AND "@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT ${ARGV0
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
list(APPEND LIBXML2_LIBRARIES m)
if(TARGET LibXml2::LibXml2)
target_link_libraries(LibXml2::LibXml2 INTERFACE "m")
set_property(TARGET LibXml2::LibXml2 APPEND PROPERTY INTERFACE_LINK_LIBRARIES "m")
endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
list(APPEND LIBXML2_LIBRARIES ws2_32)
if(TARGET LibXml2::LibXml2)
target_link_libraries(LibXml2::LibXml2 INTERFACE "ws2_32")
set_property(TARGET LibXml2::LibXml2 APPEND PROPERTY INTERFACE_LINK_LIBRARIES "ws2_32")
endif()
endif()
if(TARGET LibXml2::LibXml2)
target_link_libraries(LibXml2::LibXml2 INTERFACE "liblzma::liblzma" "ZLIB::ZLIB")
set_property(TARGET LibXml2::LibXml2 APPEND PROPERTY INTERFACE_LINK_LIBRARIES "liblzma::liblzma" "ZLIB::ZLIB")
if(TARGET Iconv::Iconv)
target_link_libraries(LibXml2::LibXml2 INTERFACE "Iconv::Iconv")
set_property(TARGET LibXml2::LibXml2 APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Iconv::Iconv")
endif()
endif()
cmake_policy(POP)

View File

@ -1,7 +1,7 @@
{
"name": "libxml2",
"version-semver": "2.9.12",
"port-version": 3,
"port-version": 4,
"description": "Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform).",
"homepage": "https://xmlsoft.org/",
"dependencies": [

View File

@ -1926,7 +1926,7 @@
},
"exiv2": {
"baseline": "0.27.4",
"port-version": 1
"port-version": 2
},
"expat": {
"baseline": "2.4.1",
@ -2238,7 +2238,7 @@
},
"gdal": {
"baseline": "3.2.2",
"port-version": 3
"port-version": 4
},
"gdcm": {
"baseline": "3.0.7",
@ -3086,7 +3086,7 @@
},
"libarchive": {
"baseline": "3.4.3",
"port-version": 7
"port-version": 8
},
"libass": {
"baseline": "0.15.1",
@ -3306,7 +3306,7 @@
},
"libiconv": {
"baseline": "1.16",
"port-version": 10
"port-version": 11
},
"libics": {
"baseline": "1.6.5",
@ -3766,7 +3766,7 @@
},
"libuv": {
"baseline": "1.41.0",
"port-version": 0
"port-version": 1
},
"libuvc": {
"baseline": "2020-11-24",
@ -3810,7 +3810,7 @@
},
"libxml2": {
"baseline": "2.9.12",
"port-version": 3
"port-version": 4
},
"libxmlmm": {
"baseline": "0.6.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4ce7841080b34ab8f91006430e9a40e0d9bfba96",
"version": "0.27.4",
"port-version": 2
},
{
"git-tree": "1e93f266421999dd82b931b2dbf672d255b14b43",
"version": "0.27.4",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b87df6a4a70bb9afb31992195a8ccc6e04d59663",
"version-semver": "3.2.2",
"port-version": 4
},
{
"git-tree": "5bb72450f69322e39e09bea191e5c947833e698d",
"version-semver": "3.2.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "576d8d60f06c8b4c616fd55559f3da94b9a8ae27",
"version-semver": "3.4.3",
"port-version": 8
},
{
"git-tree": "3c9f2bae07e5615f25bfc8326b1b85686953e918",
"version-semver": "3.4.3",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "f82980bff6c23bcccd043300679ebf8afa3e0a22",
"version": "1.16",
"port-version": 11
},
{
"git-tree": "59948ca7f6b4427c2ea93be7a1558843cdd8cde3",
"version-string": "1.16",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "42fa2a97059c54e5c2374a9762a7060d85a1091b",
"version": "1.41.0",
"port-version": 1
},
{
"git-tree": "25ef9957bffba1e73f3dd857f8dc27148ec6f84f",
"version-string": "1.41.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "5cb8ed61786fdd081204880cd02d9376b17130eb",
"version-semver": "2.9.12",
"port-version": 4
},
{
"git-tree": "091644d055f6ab14ab96001c90418be9f5c4d6e3",
"version-semver": "2.9.12",