[vcpkg] Fix lib uuid handling for x64-mingw-dynamic (#17137)

* Link static uuid on MiNGW

* Trigger rebuild
This commit is contained in:
Kai Pastor 2021-05-26 18:13:16 +02:00 committed by GitHub
parent 83f9a6c469
commit df34b02e52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -574,6 +574,11 @@ function(vcpkg_configure_make)
list(TRANSFORM ALL_LIBS_LIST REPLACE "^(${_lprefix})" "")
endif()
list(JOIN ALL_LIBS_LIST " ${_lprefix}" ALL_LIBS_STRING)
if(VCPKG_TARGET_IS_MINGW AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
# libtool must be told explicitly that there is no dynamic linkage for uuid.
# The "-Wl,..." syntax is understood by libtool and gcc, but no by ld.
string(REPLACE " -luuid" " -Wl,-Bstatic,-luuid,-Bdynamic" ALL_LIBS_STRING "${ALL_LIBS_STRING}")
endif()
if(ALL_LIBS_STRING)
set(ALL_LIBS_STRING "${_lprefix}${ALL_LIBS_STRING}")