mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 11:21:12 +08:00
[curl] Fix static build (#12800)
* [curl] Fix static build * Add static patch
This commit is contained in:
parent
d7fc2196c1
commit
dea76199aa
@ -1,15 +1,15 @@
|
||||
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
|
||||
index 62b7b33..9b0e2e1 100644
|
||||
index 62b7b33..8a4bd71 100644
|
||||
--- a/lib/CMakeLists.txt
|
||||
+++ b/lib/CMakeLists.txt
|
||||
@@ -107,7 +107,9 @@ endif()
|
||||
@@ -107,6 +107,10 @@ endif()
|
||||
|
||||
target_link_libraries(${LIB_NAME} ${CURL_LIBS})
|
||||
|
||||
-if(WIN32)
|
||||
+if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
+ add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS)
|
||||
+elseif(WIN32)
|
||||
+endif()
|
||||
+
|
||||
if(WIN32)
|
||||
add_definitions(-D_USRDLL)
|
||||
endif()
|
||||
|
||||
|
13
ports/curl/0011_fix_static_build.patch
Normal file
13
ports/curl/0011_fix_static_build.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
|
||||
index 8a4bd71..1927fb0 100644
|
||||
--- a/lib/CMakeLists.txt
|
||||
+++ b/lib/CMakeLists.txt
|
||||
@@ -111,7 +111,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
-if(WIN32)
|
||||
+if(WIN32 AND BUILD_SHARED_LIBS)
|
||||
add_definitions(-D_USRDLL)
|
||||
endif()
|
||||
|
@ -1,6 +1,6 @@
|
||||
Source: curl
|
||||
Version: 7.71.1
|
||||
Port-Version: 1
|
||||
Port-Version: 2
|
||||
Build-Depends: zlib
|
||||
Homepage: https://github.com/curl/curl
|
||||
Description: A library for transferring data with URLs
|
||||
|
@ -12,6 +12,7 @@ vcpkg_from_github(
|
||||
0007_disable_tool_export_curl_target.patch
|
||||
0009_fix_openssl_config.patch
|
||||
0010_fix_othertests_cmake.patch
|
||||
0011_fix_static_build.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB)
|
||||
|
Loading…
x
Reference in New Issue
Block a user