vcpkg/ports/curl/0023-fix-static-libs-export.patch
Kai Pastor d320e1a2d6
[curl] Update to 7.80, fix exported config (#21554)
* Update to 7.80

* Add 'lib' prefix to exported config for windows

* Update versions

* Export static dependencies as -l<name>

* Update versions
2021-11-22 15:44:48 -08:00

15 lines
488 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 158d7a5..ae7b388 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1534,6 +1534,9 @@ foreach(_lib ${CURL_LIBS_FLAT})
set(_lib "-framework ${_lib}")
endif()
endif()
+ if(_lib MATCHES ".*/${CMAKE_STATIC_LIBRARY_PREFIX}([^/]*)${CMAKE_STATIC_LIBRARY_SUFFIX}")
+ set(_lib -l${CMAKE_MATCH_1})
+ endif()
if(_lib MATCHES ".*/.*" OR _lib MATCHES "^-")
set(LIBCURL_LIBS "${LIBCURL_LIBS} ${_lib}")
else()