Skip to content

Commit

Permalink
Fix target_link_libraries on repeated inclusion of wrappers (#19120)
Browse files Browse the repository at this point in the history
* Fix repeated inclusion of wrappers

* x-add-version
  • Loading branch information
dg0yt authored Sep 2, 2021
1 parent bff0e8f commit 9f73bc1
Show file tree
Hide file tree
Showing 20 changed files with 69 additions and 34 deletions.
2 changes: 1 addition & 1 deletion ports/exiv2/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion ports/exiv2/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion ports/gdal/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ports/gdal/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
14 changes: 7 additions & 7 deletions ports/libarchive/vcpkg-cmake-wrapper.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion ports/libarchive/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
5 changes: 0 additions & 5 deletions ports/libiconv/CONTROL

This file was deleted.

7 changes: 7 additions & 0 deletions ports/libiconv/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "libiconv",
"version": "1.16",
"port-version": 11,
"description": "GNU Unicode text conversion",
"homepage": "https://www.gnu.org/software/libiconv/"
}
4 changes: 0 additions & 4 deletions ports/libuv/CONTROL

This file was deleted.

4 changes: 2 additions & 2 deletions ports/libuv/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 7 additions & 0 deletions ports/libuv/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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"
}
8 changes: 4 additions & 4 deletions ports/libxml2/vcpkg-cmake-wrapper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ports/libxml2/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
12 changes: 6 additions & 6 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1926,7 +1926,7 @@
},
"exiv2": {
"baseline": "0.27.4",
"port-version": 1
"port-version": 2
},
"expat": {
"baseline": "2.4.1",
Expand Down Expand Up @@ -2238,7 +2238,7 @@
},
"gdal": {
"baseline": "3.2.2",
"port-version": 3
"port-version": 4
},
"gdcm": {
"baseline": "3.0.7",
Expand Down Expand Up @@ -3086,7 +3086,7 @@
},
"libarchive": {
"baseline": "3.4.3",
"port-version": 7
"port-version": 8
},
"libass": {
"baseline": "0.15.1",
Expand Down Expand Up @@ -3306,7 +3306,7 @@
},
"libiconv": {
"baseline": "1.16",
"port-version": 10
"port-version": 11
},
"libics": {
"baseline": "1.6.5",
Expand Down Expand Up @@ -3766,7 +3766,7 @@
},
"libuv": {
"baseline": "1.41.0",
"port-version": 0
"port-version": 1
},
"libuvc": {
"baseline": "2020-11-24",
Expand Down Expand Up @@ -3810,7 +3810,7 @@
},
"libxml2": {
"baseline": "2.9.12",
"port-version": 3
"port-version": 4
},
"libxmlmm": {
"baseline": "0.6.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/e-/exiv2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4ce7841080b34ab8f91006430e9a40e0d9bfba96",
"version": "0.27.4",
"port-version": 2
},
{
"git-tree": "1e93f266421999dd82b931b2dbf672d255b14b43",
"version": "0.27.4",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/gdal.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b87df6a4a70bb9afb31992195a8ccc6e04d59663",
"version-semver": "3.2.2",
"port-version": 4
},
{
"git-tree": "5bb72450f69322e39e09bea191e5c947833e698d",
"version-semver": "3.2.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libarchive.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "576d8d60f06c8b4c616fd55559f3da94b9a8ae27",
"version-semver": "3.4.3",
"port-version": 8
},
{
"git-tree": "3c9f2bae07e5615f25bfc8326b1b85686953e918",
"version-semver": "3.4.3",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libiconv.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "f82980bff6c23bcccd043300679ebf8afa3e0a22",
"version": "1.16",
"port-version": 11
},
{
"git-tree": "59948ca7f6b4427c2ea93be7a1558843cdd8cde3",
"version-string": "1.16",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libuv.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "42fa2a97059c54e5c2374a9762a7060d85a1091b",
"version": "1.41.0",
"port-version": 1
},
{
"git-tree": "25ef9957bffba1e73f3dd857f8dc27148ec6f84f",
"version-string": "1.41.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libxml2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "5cb8ed61786fdd081204880cd02d9376b17130eb",
"version-semver": "2.9.12",
"port-version": 4
},
{
"git-tree": "091644d055f6ab14ab96001c90418be9f5c4d6e3",
"version-semver": "2.9.12",
Expand Down

0 comments on commit 9f73bc1

Please sign in to comment.