forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[curl] Update to 8.3.0 (microsoft#33924)
* [curl] Update to 8.3.0 * Add explicit usage * Fix CMake 3.7 compatibility * Update copyright * Update vcpkg-cmake-wrapper
- Loading branch information
Showing
10 changed files
with
85 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt | ||
index 8cea346c3..967312905 100644 | ||
--- a/lib/CMakeLists.txt | ||
+++ b/lib/CMakeLists.txt | ||
@@ -118,6 +118,10 @@ if(CURL_HAS_LTO) | ||
INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE) | ||
endif() | ||
|
||
+if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") | ||
+ set_property(TARGET ${LIB_NAME} APPEND PROPERTY COMPILE_DEFINITIONS "_WINSOCK_DEPRECATED_NO_WARNINGS") | ||
+endif() | ||
+ | ||
if(WIN32) | ||
if(BUILD_SHARED_LIBS) | ||
if(MSVC) | ||
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt | ||
index 9bb8f0b..7678f43 100644 | ||
--- a/lib/CMakeLists.txt | ||
+++ b/lib/CMakeLists.txt | ||
@@ -216,6 +216,10 @@ if(BUILD_SHARED_LIBS) | ||
$<BUILD_INTERFACE:${CURL_SOURCE_DIR}/include>) | ||
endif() | ||
|
||
+if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") | ||
+ set_property(TARGET ${LIB_SELECTED} APPEND PROPERTY COMPILE_DEFINITIONS "_WINSOCK_DEPRECATED_NO_WARNINGS") | ||
+endif() | ||
+ | ||
add_library(${LIB_NAME} ALIAS ${LIB_SELECTED}) | ||
add_library(${PROJECT_NAME}::${LIB_NAME} ALIAS ${LIB_SELECTED}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt | ||
index 1d71e14..62b7b33 100644 | ||
index 7678f43..00f61f8 100644 | ||
--- a/lib/CMakeLists.txt | ||
+++ b/lib/CMakeLists.txt | ||
@@ -125,7 +125,6 @@ if(WIN32) | ||
if(MSVC) | ||
# Add "_imp" as a suffix before the extension to avoid conflicting with | ||
# the statically linked "libcurl.lib" | ||
- set_target_properties(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib") | ||
endif() | ||
endif() | ||
elseif(NOT CMAKE_CROSSCOMPILING) | ||
@@ -105,7 +105,6 @@ endif() | ||
if(WIN32 AND | ||
NOT IMPORT_LIB_SUFFIX AND | ||
CMAKE_STATIC_LIBRARY_SUFFIX STREQUAL CMAKE_IMPORT_LIBRARY_SUFFIX) | ||
- set(IMPORT_LIB_SUFFIX "_imp") | ||
endif() | ||
|
||
# Whether to do a single compilation pass for libcurl sources and reuse these |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 09d82f1..f0d99e6 100644 | ||
index a35ee52..ee133d5 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -1507,6 +1507,7 @@ else() | ||
@@ -1611,6 +1611,7 @@ if(BUILD_SHARED_LIBS) | ||
else() | ||
set(ENABLE_SHARED "no") | ||
set(ENABLE_STATIC "yes") | ||
set(LIBCURL_NO_SHARED "${LIBCURL_LIBS}") | ||
+ set(LIBCURL_LIBS "") | ||
set(CPPFLAG_CURL_STATICLIB "-DCURL_STATICLIB") | ||
endif() | ||
# "a" (Linux) or "lib" (Windows) | ||
string(REPLACE "." "" libext "${CMAKE_STATIC_LIBRARY_SUFFIX}") | ||
if(BUILD_STATIC_LIBS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/CMake/curl-config.cmake.in b/CMake/curl-config.cmake.in | ||
index 056907c4f..56f7c9dd9 100644 | ||
--- a/CMake/curl-config.cmake.in | ||
+++ b/CMake/curl-config.cmake.in | ||
@@ -35,4 +35,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]") | ||
check_required_components("@PROJECT_NAME@") | ||
|
||
# Alias for either shared or static library | ||
-add_library(@PROJECT_NAME@::libcurl ALIAS @PROJECT_NAME@::@LIB_SELECTED@) | ||
+if(NOT TARGET @PROJECT_NAME@::libcurl) | ||
+ add_library(@PROJECT_NAME@::libcurl INTERFACE IMPORTED) | ||
+ set_target_properties(@PROJECT_NAME@::libcurl PROPERTIES INTERFACE_LINK_LIBRARIES @PROJECT_NAME@::@LIB_SELECTED@) | ||
+endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
curl is compatible with built-in CMake targets: | ||
|
||
find_package(CURL REQUIRED) | ||
target_link_libraries(main PRIVATE CURL::libcurl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters