aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKai Pastor <dg0yt@darc.de>2021-05-26 18:13:16 +0200
committerGitHub <noreply@github.com>2021-05-26 09:13:16 -0700
commitdf34b02e52a7da2268a05f7a95d99af8c0350152 (patch)
treed9c0888440892edf1305320af1cf280867747f08 /scripts
parent83f9a6c469bcfe5bca6c990099e321427ad0db97 (diff)
downloadvcpkg-df34b02e52a7da2268a05f7a95d99af8c0350152.tar.gz
vcpkg-df34b02e52a7da2268a05f7a95d99af8c0350152.zip
[vcpkg] Fix lib uuid handling for x64-mingw-dynamic (#17137)
* Link static uuid on MiNGW * Trigger rebuild
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_configure_make.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/cmake/vcpkg_configure_make.cmake b/scripts/cmake/vcpkg_configure_make.cmake
index 2294bf807..a6cac929b 100644
--- a/scripts/cmake/vcpkg_configure_make.cmake
+++ b/scripts/cmake/vcpkg_configure_make.cmake
@@ -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}")