vcpkg/ports/curl/0004_nghttp2_staticlib.patch
Matt Tyson ef5686e586 Fix Windows curl/nghttp2 static build
When curl is linked with a static nghttp2, NGHTTP2_STATICLIB
must be defined.
2018-05-19 19:43:02 -07:00

15 lines
394 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 490cc19..51c0a92 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -388,6 +388,9 @@ if(USE_NGHTTP2)
find_package(NGHTTP2 REQUIRED)
include_directories(${NGHTTP2_INCLUDE_DIRS})
list(APPEND CURL_LIBS ${NGHTTP2_LIBRARIES})
+ if(CURL_STATICLIB)
+ add_definitions(-DNGHTTP2_STATICLIB)
+ endif()
endif()
if(NOT CURL_DISABLE_LDAP)