curl: Update to 8.11.1 and use CMake to configure
This commit is contained in:
parent
1ba8541da9
commit
b5918effeb
|
@ -1,62 +1,49 @@
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
set(BUILD_CURL_EXE OFF)
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/curl/include)
|
set(BUILD_EXAMPLES OFF)
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/curl/lib)
|
set(BUILD_LIBCURL_DOCS OFF)
|
||||||
|
set(BUILD_MISC_DOCS OFF)
|
||||||
|
set(BUILD_SHARED_LIBS OFF)
|
||||||
|
set(BUILD_STATIC_LIBS ON)
|
||||||
|
set(BUILD_TESTING OFF)
|
||||||
|
set(CURL_ENABLE_EXPORT_TARGET OFF)
|
||||||
|
|
||||||
set(CURL_LIBS MbedTLS::mbedtls zlibstatic)
|
set(HTTP_ONLY ON)
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|
||||||
set(use_core_foundation ON)
|
|
||||||
|
|
||||||
find_library(SYSTEMCONFIGURATION_FRAMEWORK "SystemConfiguration")
|
set(CURL_USE_LIBPSL OFF)
|
||||||
if(NOT SYSTEMCONFIGURATION_FRAMEWORK)
|
set(CURL_USE_LIBSSH2 OFF)
|
||||||
message(FATAL_ERROR "SystemConfiguration framework not found")
|
set(CURL_ZLIB OFF CACHE BOOL "" FORCE)
|
||||||
endif()
|
set(CURL_ZSTD OFF)
|
||||||
|
set(USE_LIBIDN2 OFF)
|
||||||
|
set(USE_NGHTTP2 OFF)
|
||||||
|
|
||||||
list(APPEND CURL_LIBS "-framework SystemConfiguration")
|
if(UNIX)
|
||||||
endif()
|
# We use mbedtls on Unix(-like) systems and Android.
|
||||||
|
set(CURL_USE_OPENSSL OFF)
|
||||||
|
|
||||||
file(GLOB SRCS curl/lib/*.c curl/lib/vauth/*.c curl/lib/vquic/*.c curl/lib/vssh/*.c curl/lib/vtls/*.c)
|
# This is set if the dolphin_find_optional_system_library call from the main CMakeLists.txt
|
||||||
add_library(
|
# is able to find mbedtls on the system.
|
||||||
curl
|
if(MBEDTLS_FOUND)
|
||||||
STATIC
|
# We can just enable CURL_USE_MBEDTLS.
|
||||||
curl/include/curl/curl.h
|
set(CURL_USE_MBEDTLS ON)
|
||||||
${SRCS}
|
|
||||||
)
|
|
||||||
|
|
||||||
set(SEARCH_CA_BUNDLE_PATHS
|
|
||||||
/etc/ssl/certs/ca-certificates.crt
|
|
||||||
/etc/pki/tls/certs/ca-bundle.crt
|
|
||||||
/usr/share/ssl/certs/ca-bundle.crt
|
|
||||||
/usr/local/share/certs/ca-root-nss.crt
|
|
||||||
/etc/ssl/cert.pem)
|
|
||||||
|
|
||||||
foreach(SEARCH_CA_BUNDLE_PATH ${SEARCH_CA_BUNDLE_PATHS})
|
|
||||||
if(EXISTS "${SEARCH_CA_BUNDLE_PATH}")
|
|
||||||
message(STATUS "Found CA bundle: ${SEARCH_CA_BUNDLE_PATH}")
|
|
||||||
set(CURL_CA_BUNDLE "${SEARCH_CA_BUNDLE_PATH}")
|
|
||||||
set(CURL_CA_BUNDLE_SET TRUE)
|
|
||||||
break()
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
if(NOT CURL_CA_PATH_SET)
|
|
||||||
if(EXISTS "/etc/ssl/certs")
|
|
||||||
set(CURL_CA_PATH "/etc/ssl/certs")
|
|
||||||
set(CURL_CA_PATH_SET TRUE)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
dolphin_disable_warnings(curl)
|
|
||||||
target_link_libraries(curl ${CURL_LIBS})
|
|
||||||
target_include_directories(curl PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/curl/include")
|
|
||||||
target_compile_definitions(curl PRIVATE "BUILDING_LIBCURL=1")
|
|
||||||
if (WIN32)
|
|
||||||
target_compile_definitions(curl PUBLIC "CURL_STATICLIB=1" "CURL_DISABLE_LDAP" "USE_WINDOWS_SSPI" "USE_SCHANNEL")
|
|
||||||
target_link_libraries(curl Crypt32.lib)
|
|
||||||
else()
|
else()
|
||||||
target_compile_definitions(curl PUBLIC "CURL_STATICLIB=1" "USE_MBEDTLS=1" "HAVE_CONFIG_H=1" "CURL_DISABLE_LDAP")
|
# HACK: Set some internal variables to pretend like mbedtls was found on the system.
|
||||||
if (CURL_CA_PATH_SET)
|
# We can't use CURL_USE_MBEDTLS with our copy from Externals, as that flag expects
|
||||||
target_compile_definitions(curl PUBLIC CURL_CA_PATH="${CURL_CA_PATH}")
|
# mbedtls to be installed (the CMakeLists attempts to search for it with find_package).
|
||||||
|
set(_ssl_enabled ON)
|
||||||
|
set(USE_MBEDTLS ON)
|
||||||
|
set(_curl_ca_bundle_supported TRUE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(CURL::libcurl ALIAS curl)
|
if(WIN32)
|
||||||
|
set(CURL_USE_SCHANNEL ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(curl)
|
||||||
|
|
||||||
|
if(UNIX AND NOT MBEDTLS_FOUND)
|
||||||
|
# HACK: Manually link with the mbedtls libraries.
|
||||||
|
target_link_libraries(libcurl_static PRIVATE
|
||||||
|
MbedTLS::mbedtls
|
||||||
|
MbedTLS::mbedx509)
|
||||||
|
endif()
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
COPYRIGHT AND PERMISSION NOTICE
|
|
||||||
|
|
||||||
Copyright (c) 1996 - 2016, Daniel Stenberg, <daniel@haxx.se>, and many
|
|
||||||
contributors, see the THANKS file.
|
|
||||||
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and distribute this software for any purpose
|
|
||||||
with or without fee is hereby granted, provided that the above copyright
|
|
||||||
notice and this permission notice appear in all copies.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
|
|
||||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
||||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
||||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
|
||||||
OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of a copyright holder shall not
|
|
||||||
be used in advertising or otherwise to promote the sale, use or other dealings
|
|
||||||
in this Software without prior written authorization of the copyright holder.
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit d755a5f7c009dd63a61b2c745180d8ba937cbfeb
|
Subproject commit 75a2079d5c28debb2eaa848ca9430f1fe0d7844c
|
|
@ -50,14 +50,14 @@
|
||||||
<ClCompile Include="curl\lib\curl_memrchr.c" />
|
<ClCompile Include="curl\lib\curl_memrchr.c" />
|
||||||
<ClCompile Include="curl\lib\curl_multibyte.c" />
|
<ClCompile Include="curl\lib\curl_multibyte.c" />
|
||||||
<ClCompile Include="curl\lib\curl_ntlm_core.c" />
|
<ClCompile Include="curl\lib\curl_ntlm_core.c" />
|
||||||
<ClCompile Include="curl\lib\curl_ntlm_wb.c" />
|
|
||||||
<ClCompile Include="curl\lib\curl_path.c" />
|
|
||||||
<ClCompile Include="curl\lib\curl_range.c" />
|
<ClCompile Include="curl\lib\curl_range.c" />
|
||||||
<ClCompile Include="curl\lib\curl_rtmp.c" />
|
<ClCompile Include="curl\lib\curl_rtmp.c" />
|
||||||
<ClCompile Include="curl\lib\curl_sasl.c" />
|
<ClCompile Include="curl\lib\curl_sasl.c" />
|
||||||
|
<ClCompile Include="curl\lib\curl_sha512_256.c" />
|
||||||
<ClCompile Include="curl\lib\curl_sspi.c" />
|
<ClCompile Include="curl\lib\curl_sspi.c" />
|
||||||
<ClCompile Include="curl\lib\curl_threads.c" />
|
<ClCompile Include="curl\lib\curl_threads.c" />
|
||||||
<ClCompile Include="curl\lib\curl_trc.c" />
|
<ClCompile Include="curl\lib\curl_trc.c" />
|
||||||
|
<ClCompile Include="curl\lib\cw-out.c" />
|
||||||
<ClCompile Include="curl\lib\dict.c" />
|
<ClCompile Include="curl\lib\dict.c" />
|
||||||
<ClCompile Include="curl\lib\doh.c" />
|
<ClCompile Include="curl\lib\doh.c" />
|
||||||
<ClCompile Include="curl\lib\dynbuf.c" />
|
<ClCompile Include="curl\lib\dynbuf.c" />
|
||||||
|
@ -120,6 +120,7 @@
|
||||||
<ClCompile Include="curl\lib\psl.c" />
|
<ClCompile Include="curl\lib\psl.c" />
|
||||||
<ClCompile Include="curl\lib\rand.c" />
|
<ClCompile Include="curl\lib\rand.c" />
|
||||||
<ClCompile Include="curl\lib\rename.c" />
|
<ClCompile Include="curl\lib\rename.c" />
|
||||||
|
<ClCompile Include="curl\lib\request.c" />
|
||||||
<ClCompile Include="curl\lib\rtsp.c" />
|
<ClCompile Include="curl\lib\rtsp.c" />
|
||||||
<ClCompile Include="curl\lib\select.c" />
|
<ClCompile Include="curl\lib\select.c" />
|
||||||
<ClCompile Include="curl\lib\sendf.c" />
|
<ClCompile Include="curl\lib\sendf.c" />
|
||||||
|
@ -167,12 +168,16 @@
|
||||||
<ClCompile Include="curl\lib\vauth\vauth.c" />
|
<ClCompile Include="curl\lib\vauth\vauth.c" />
|
||||||
<ClCompile Include="curl\lib\vquic\curl_msh3.c" />
|
<ClCompile Include="curl\lib\vquic\curl_msh3.c" />
|
||||||
<ClCompile Include="curl\lib\vquic\curl_ngtcp2.c" />
|
<ClCompile Include="curl\lib\vquic\curl_ngtcp2.c" />
|
||||||
|
<ClCompile Include="curl\lib\vquic\curl_osslq.c" />
|
||||||
<ClCompile Include="curl\lib\vquic\curl_quiche.c" />
|
<ClCompile Include="curl\lib\vquic\curl_quiche.c" />
|
||||||
<ClCompile Include="curl\lib\vquic\vquic.c" />
|
<ClCompile Include="curl\lib\vquic\vquic.c" />
|
||||||
|
<ClCompile Include="curl\lib\vquic\vquic-tls.c" />
|
||||||
|
<ClCompile Include="curl\lib\vssh\curl_path.c" />
|
||||||
<ClCompile Include="curl\lib\vssh\libssh.c" />
|
<ClCompile Include="curl\lib\vssh\libssh.c" />
|
||||||
<ClCompile Include="curl\lib\vssh\libssh2.c" />
|
<ClCompile Include="curl\lib\vssh\libssh2.c" />
|
||||||
<ClCompile Include="curl\lib\vssh\wolfssh.c" />
|
<ClCompile Include="curl\lib\vssh\wolfssh.c" />
|
||||||
<ClCompile Include="curl\lib\vtls\bearssl.c" />
|
<ClCompile Include="curl\lib\vtls\bearssl.c" />
|
||||||
|
<ClCompile Include="curl\lib\vtls\cipher_suite.c" />
|
||||||
<ClCompile Include="curl\lib\vtls\gtls.c" />
|
<ClCompile Include="curl\lib\vtls\gtls.c" />
|
||||||
<ClCompile Include="curl\lib\vtls\hostcheck.c" />
|
<ClCompile Include="curl\lib\vtls\hostcheck.c" />
|
||||||
<ClCompile Include="curl\lib\vtls\keylog.c" />
|
<ClCompile Include="curl\lib\vtls\keylog.c" />
|
||||||
|
@ -244,8 +249,6 @@
|
||||||
<ClInclude Include="curl\lib\curl_memrchr.h" />
|
<ClInclude Include="curl\lib\curl_memrchr.h" />
|
||||||
<ClInclude Include="curl\lib\curl_multibyte.h" />
|
<ClInclude Include="curl\lib\curl_multibyte.h" />
|
||||||
<ClInclude Include="curl\lib\curl_ntlm_core.h" />
|
<ClInclude Include="curl\lib\curl_ntlm_core.h" />
|
||||||
<ClInclude Include="curl\lib\curl_ntlm_wb.h" />
|
|
||||||
<ClInclude Include="curl\lib\curl_path.h" />
|
|
||||||
<ClInclude Include="curl\lib\curl_printf.h" />
|
<ClInclude Include="curl\lib\curl_printf.h" />
|
||||||
<ClInclude Include="curl\lib\curl_range.h" />
|
<ClInclude Include="curl\lib\curl_range.h" />
|
||||||
<ClInclude Include="curl\lib\curl_rtmp.h" />
|
<ClInclude Include="curl\lib\curl_rtmp.h" />
|
||||||
|
@ -253,9 +256,11 @@
|
||||||
<ClInclude Include="curl\lib\curl_setup.h" />
|
<ClInclude Include="curl\lib\curl_setup.h" />
|
||||||
<ClInclude Include="curl\lib\curl_setup_once.h" />
|
<ClInclude Include="curl\lib\curl_setup_once.h" />
|
||||||
<ClInclude Include="curl\lib\curl_sha256.h" />
|
<ClInclude Include="curl\lib\curl_sha256.h" />
|
||||||
|
<ClInclude Include="curl\lib\curl_sha512_256.h" />
|
||||||
<ClInclude Include="curl\lib\curl_sspi.h" />
|
<ClInclude Include="curl\lib\curl_sspi.h" />
|
||||||
<ClInclude Include="curl\lib\curl_threads.h" />
|
<ClInclude Include="curl\lib\curl_threads.h" />
|
||||||
<ClInclude Include="curl\lib\curl_trc.h" />
|
<ClInclude Include="curl\lib\curl_trc.h" />
|
||||||
|
<ClInclude Include="curl\lib\cw_out.h" />
|
||||||
<ClInclude Include="curl\lib\dict.h" />
|
<ClInclude Include="curl\lib\dict.h" />
|
||||||
<ClInclude Include="curl\lib\doh.h" />
|
<ClInclude Include="curl\lib\doh.h" />
|
||||||
<ClInclude Include="curl\lib\dynbuf.h" />
|
<ClInclude Include="curl\lib\dynbuf.h" />
|
||||||
|
@ -308,6 +313,7 @@
|
||||||
<ClInclude Include="curl\lib\psl.h" />
|
<ClInclude Include="curl\lib\psl.h" />
|
||||||
<ClInclude Include="curl\lib\rand.h" />
|
<ClInclude Include="curl\lib\rand.h" />
|
||||||
<ClInclude Include="curl\lib\rename.h" />
|
<ClInclude Include="curl\lib\rename.h" />
|
||||||
|
<ClInclude Include="curl\lib\request.h" />
|
||||||
<ClInclude Include="curl\lib\rtsp.h" />
|
<ClInclude Include="curl\lib\rtsp.h" />
|
||||||
<ClInclude Include="curl\lib\select.h" />
|
<ClInclude Include="curl\lib\select.h" />
|
||||||
<ClInclude Include="curl\lib\sendf.h" />
|
<ClInclude Include="curl\lib\sendf.h" />
|
||||||
|
@ -347,11 +353,15 @@
|
||||||
<ClInclude Include="curl\lib\vauth\vauth.h" />
|
<ClInclude Include="curl\lib\vauth\vauth.h" />
|
||||||
<ClInclude Include="curl\lib\vquic\curl_msh3.h" />
|
<ClInclude Include="curl\lib\vquic\curl_msh3.h" />
|
||||||
<ClInclude Include="curl\lib\vquic\curl_ngtcp2.h" />
|
<ClInclude Include="curl\lib\vquic\curl_ngtcp2.h" />
|
||||||
|
<ClInclude Include="curl\lib\vquic\curl_osslq.h" />
|
||||||
<ClInclude Include="curl\lib\vquic\curl_quiche.h" />
|
<ClInclude Include="curl\lib\vquic\curl_quiche.h" />
|
||||||
<ClInclude Include="curl\lib\vquic\vquic.h" />
|
<ClInclude Include="curl\lib\vquic\vquic.h" />
|
||||||
|
<ClInclude Include="curl\lib\vquic\vquic-tls.h" />
|
||||||
<ClInclude Include="curl\lib\vquic\vquic_int.h" />
|
<ClInclude Include="curl\lib\vquic\vquic_int.h" />
|
||||||
|
<ClInclude Include="curl\lib\vssh\curl_path.h" />
|
||||||
<ClInclude Include="curl\lib\vssh\ssh.h" />
|
<ClInclude Include="curl\lib\vssh\ssh.h" />
|
||||||
<ClInclude Include="curl\lib\vtls\bearssl.h" />
|
<ClInclude Include="curl\lib\vtls\bearssl.h" />
|
||||||
|
<ClInclude Include="curl\lib\vtls\cipher_suites.h" />
|
||||||
<ClInclude Include="curl\lib\vtls\gtls.h" />
|
<ClInclude Include="curl\lib\vtls\gtls.h" />
|
||||||
<ClInclude Include="curl\lib\vtls\hostcheck.h" />
|
<ClInclude Include="curl\lib\vtls\hostcheck.h" />
|
||||||
<ClInclude Include="curl\lib\vtls\keylog.h" />
|
<ClInclude Include="curl\lib\vtls\keylog.h" />
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue