From 9f73bc1a0e71b8883f20cae72a4e63ce347a3493 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Thu, 2 Sep 2021 22:21:52 +0200 Subject: [PATCH] Fix target_link_libraries on repeated inclusion of wrappers (#19120) * Fix repeated inclusion of wrappers * x-add-version --- ports/exiv2/vcpkg-cmake-wrapper.cmake | 2 +- ports/exiv2/vcpkg.json | 2 +- ports/gdal/vcpkg-cmake-wrapper.cmake | 2 +- ports/gdal/vcpkg.json | 2 +- ports/libarchive/vcpkg-cmake-wrapper.cmake.in | 14 +++++++------- ports/libarchive/vcpkg.json | 2 +- ports/libiconv/CONTROL | 5 ----- ports/libiconv/vcpkg.json | 7 +++++++ ports/libuv/CONTROL | 4 ---- ports/libuv/vcpkg-cmake-wrapper.cmake | 4 ++-- ports/libuv/vcpkg.json | 7 +++++++ ports/libxml2/vcpkg-cmake-wrapper.cmake | 8 ++++---- ports/libxml2/vcpkg.json | 2 +- versions/baseline.json | 12 ++++++------ versions/e-/exiv2.json | 5 +++++ versions/g-/gdal.json | 5 +++++ versions/l-/libarchive.json | 5 +++++ versions/l-/libiconv.json | 5 +++++ versions/l-/libuv.json | 5 +++++ versions/l-/libxml2.json | 5 +++++ 20 files changed, 69 insertions(+), 34 deletions(-) delete mode 100644 ports/libiconv/CONTROL create mode 100644 ports/libiconv/vcpkg.json delete mode 100644 ports/libuv/CONTROL create mode 100644 ports/libuv/vcpkg.json diff --git a/ports/exiv2/vcpkg-cmake-wrapper.cmake b/ports/exiv2/vcpkg-cmake-wrapper.cmake index 354a7909cdafa6..62f4ecca347b39 100644 --- a/ports/exiv2/vcpkg-cmake-wrapper.cmake +++ b/ports/exiv2/vcpkg-cmake-wrapper.cmake @@ -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() diff --git a/ports/exiv2/vcpkg.json b/ports/exiv2/vcpkg.json index a043f83bfefe54..5ed357690aab2e 100644 --- a/ports/exiv2/vcpkg.json +++ b/ports/exiv2/vcpkg.json @@ -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", diff --git a/ports/gdal/vcpkg-cmake-wrapper.cmake b/ports/gdal/vcpkg-cmake-wrapper.cmake index f6241e25939f20..77e48eb4ad90e7 100644 --- a/ports/gdal/vcpkg-cmake-wrapper.cmake +++ b/ports/gdal/vcpkg-cmake-wrapper.cmake @@ -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) diff --git a/ports/gdal/vcpkg.json b/ports/gdal/vcpkg.json index 8ef4de49b4de55..2bb7b63b114c34 100644 --- a/ports/gdal/vcpkg.json +++ b/ports/gdal/vcpkg.json @@ -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", diff --git a/ports/libarchive/vcpkg-cmake-wrapper.cmake.in b/ports/libarchive/vcpkg-cmake-wrapper.cmake.in index e0712d3e2aa546..81cc39e39b30b3 100644 --- a/ports/libarchive/vcpkg-cmake-wrapper.cmake.in +++ b/ports/libarchive/vcpkg-cmake-wrapper.cmake.in @@ -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() diff --git a/ports/libarchive/vcpkg.json b/ports/libarchive/vcpkg.json index 3d95284a4887d8..53650dc2d8fe20 100644 --- a/ports/libarchive/vcpkg.json +++ b/ports/libarchive/vcpkg.json @@ -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", diff --git a/ports/libiconv/CONTROL b/ports/libiconv/CONTROL deleted file mode 100644 index 2e69c031b37ea7..00000000000000 --- a/ports/libiconv/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libiconv -Version: 1.16 -Port-Version: 10 -Homepage: https://www.gnu.org/software/libiconv/ -Description: GNU Unicode text conversion diff --git a/ports/libiconv/vcpkg.json b/ports/libiconv/vcpkg.json new file mode 100644 index 00000000000000..2cafb021836a0a --- /dev/null +++ b/ports/libiconv/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libiconv", + "version": "1.16", + "port-version": 11, + "description": "GNU Unicode text conversion", + "homepage": "https://www.gnu.org/software/libiconv/" +} diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL deleted file mode 100644 index 27938a4ad07b3a..00000000000000 --- a/ports/libuv/CONTROL +++ /dev/null @@ -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. diff --git a/ports/libuv/vcpkg-cmake-wrapper.cmake b/ports/libuv/vcpkg-cmake-wrapper.cmake index 10b6e649838a58..d95350a6d4c7b9 100644 --- a/ports/libuv/vcpkg-cmake-wrapper.cmake +++ b/ports/libuv/vcpkg-cmake-wrapper.cmake @@ -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() diff --git a/ports/libuv/vcpkg.json b/ports/libuv/vcpkg.json new file mode 100644 index 00000000000000..d43b82c54e8629 --- /dev/null +++ b/ports/libuv/vcpkg.json @@ -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" +} diff --git a/ports/libxml2/vcpkg-cmake-wrapper.cmake b/ports/libxml2/vcpkg-cmake-wrapper.cmake index 9287c37e630bce..f80be639addbc8 100644 --- a/ports/libxml2/vcpkg-cmake-wrapper.cmake +++ b/ports/libxml2/vcpkg-cmake-wrapper.cmake @@ -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) diff --git a/ports/libxml2/vcpkg.json b/ports/libxml2/vcpkg.json index 228b43572206ce..68cb1e3eb4da44 100644 --- a/ports/libxml2/vcpkg.json +++ b/ports/libxml2/vcpkg.json @@ -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": [ diff --git a/versions/baseline.json b/versions/baseline.json index e333a3c349fb71..3240c763101d76 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -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", diff --git a/versions/e-/exiv2.json b/versions/e-/exiv2.json index 5673a816d02653..b98e6e654c75c5 100644 --- a/versions/e-/exiv2.json +++ b/versions/e-/exiv2.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "4ce7841080b34ab8f91006430e9a40e0d9bfba96", + "version": "0.27.4", + "port-version": 2 + }, { "git-tree": "1e93f266421999dd82b931b2dbf672d255b14b43", "version": "0.27.4", diff --git a/versions/g-/gdal.json b/versions/g-/gdal.json index d6da35027c5dc3..762f3061eeb770 100644 --- a/versions/g-/gdal.json +++ b/versions/g-/gdal.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "b87df6a4a70bb9afb31992195a8ccc6e04d59663", + "version-semver": "3.2.2", + "port-version": 4 + }, { "git-tree": "5bb72450f69322e39e09bea191e5c947833e698d", "version-semver": "3.2.2", diff --git a/versions/l-/libarchive.json b/versions/l-/libarchive.json index 97dcae3bdf0569..689a49eec5fb17 100644 --- a/versions/l-/libarchive.json +++ b/versions/l-/libarchive.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "576d8d60f06c8b4c616fd55559f3da94b9a8ae27", + "version-semver": "3.4.3", + "port-version": 8 + }, { "git-tree": "3c9f2bae07e5615f25bfc8326b1b85686953e918", "version-semver": "3.4.3", diff --git a/versions/l-/libiconv.json b/versions/l-/libiconv.json index 63631614f331b5..9423b2719d2fcf 100644 --- a/versions/l-/libiconv.json +++ b/versions/l-/libiconv.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "f82980bff6c23bcccd043300679ebf8afa3e0a22", + "version": "1.16", + "port-version": 11 + }, { "git-tree": "59948ca7f6b4427c2ea93be7a1558843cdd8cde3", "version-string": "1.16", diff --git a/versions/l-/libuv.json b/versions/l-/libuv.json index 673b06bea8c896..011e4609c2b0e9 100644 --- a/versions/l-/libuv.json +++ b/versions/l-/libuv.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "42fa2a97059c54e5c2374a9762a7060d85a1091b", + "version": "1.41.0", + "port-version": 1 + }, { "git-tree": "25ef9957bffba1e73f3dd857f8dc27148ec6f84f", "version-string": "1.41.0", diff --git a/versions/l-/libxml2.json b/versions/l-/libxml2.json index 455ba947736e3c..5645cd5645cac3 100644 --- a/versions/l-/libxml2.json +++ b/versions/l-/libxml2.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "5cb8ed61786fdd081204880cd02d9376b17130eb", + "version-semver": "2.9.12", + "port-version": 4 + }, { "git-tree": "091644d055f6ab14ab96001c90418be9f5c4d6e3", "version-semver": "2.9.12",