mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 13:48:02 +08:00
[curl] Build openssl and schannel backends by default (#3932)
* [curl] Split the OpenSSL and SChannel backends into separate features * [curl] Add mbedTLS backend as a feature * [curl] Make winssl the default for Windows. Remove need for compatibility workaround. * [curl] Continue to use openssl in UWP because PSecurityFunctionTableA is not available.
This commit is contained in:
parent
4c6950adcb
commit
8346836471
@ -1,9 +1,8 @@
|
|||||||
Source: curl
|
Source: curl
|
||||||
Version: 7.61.1-1
|
Version: 7.61.1-2
|
||||||
Build-Depends: zlib
|
Build-Depends: zlib
|
||||||
Description: A library for transferring data with URLs
|
Description: A library for transferring data with URLs
|
||||||
Default-Features: ssl
|
Default-Features: ssl
|
||||||
# For WINSSL add set(CURL_USE_WINSSL ON) to your triplet file
|
|
||||||
|
|
||||||
Feature: tool
|
Feature: tool
|
||||||
Description: Builds curl executable
|
Description: Builds curl executable
|
||||||
@ -16,9 +15,21 @@ Build-Depends: nghttp2, curl[ssl]
|
|||||||
Description: HTTP2 support
|
Description: HTTP2 support
|
||||||
|
|
||||||
Feature: ssl
|
Feature: ssl
|
||||||
Build-Depends: openssl
|
Build-Depends: curl[openssl] (!windows), curl[winssl] (windows)
|
||||||
Description: SSL support
|
Description: Default SSL backend
|
||||||
|
|
||||||
Feature: ssh
|
Feature: ssh
|
||||||
Build-Depends: libssh2, curl[non-http]
|
Build-Depends: libssh2, curl[non-http]
|
||||||
Description: SSH support via libssh2
|
Description: SSH support via libssh2
|
||||||
|
|
||||||
|
# SSL backends
|
||||||
|
Feature: openssl
|
||||||
|
Build-Depends: openssl
|
||||||
|
Description: SSL support (OpenSSL)
|
||||||
|
|
||||||
|
Feature: winssl
|
||||||
|
Description: SSL support (Secure Channel / "WinSSL")
|
||||||
|
|
||||||
|
Feature: mbedtls
|
||||||
|
Build-Depends: mbedtls
|
||||||
|
Description: SSL support (mbedTLS)
|
||||||
|
@ -7,15 +7,15 @@ vcpkg_from_github(
|
|||||||
SHA512 09fa3c87f8d516eabe3241247a5094c32ee0481961cf85bf78ecb13acdf23bb2ec82f113d2660271d22742c79e76d73fb122730fa28e34c7f5477c05a4a6534c
|
SHA512 09fa3c87f8d516eabe3241247a5094c32ee0481961cf85bf78ecb13acdf23bb2ec82f113d2660271d22742c79e76d73fb122730fa28e34c7f5477c05a4a6534c
|
||||||
HEAD_REF master
|
HEAD_REF master
|
||||||
PATCHES
|
PATCHES
|
||||||
${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch
|
0001_cmake.patch
|
||||||
${CMAKE_CURRENT_LIST_DIR}/0002_fix_uwp.patch
|
0002_fix_uwp.patch
|
||||||
${CMAKE_CURRENT_LIST_DIR}/0003_fix_libraries.patch
|
0003_fix_libraries.patch
|
||||||
${CMAKE_CURRENT_LIST_DIR}/0004_nghttp2_staticlib.patch
|
0004_nghttp2_staticlib.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB)
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB)
|
||||||
|
|
||||||
# Support HTTP2 TSL Download https://curl.haxx.se/ca/cacert.pem rename to curl-ca-bundle.crt, copy it to libcurl.dll location.
|
# Support HTTP2 TLS Download https://curl.haxx.se/ca/cacert.pem rename to curl-ca-bundle.crt, copy it to libcurl.dll location.
|
||||||
set(HTTP2_OPTIONS)
|
set(HTTP2_OPTIONS)
|
||||||
if("http2" IN_LIST FEATURES)
|
if("http2" IN_LIST FEATURES)
|
||||||
set(HTTP2_OPTIONS -DUSE_NGHTTP2=ON)
|
set(HTTP2_OPTIONS -DUSE_NGHTTP2=ON)
|
||||||
@ -23,13 +23,21 @@ endif()
|
|||||||
|
|
||||||
# SSL
|
# SSL
|
||||||
set(USE_OPENSSL OFF)
|
set(USE_OPENSSL OFF)
|
||||||
|
if("openssl" IN_LIST FEATURES)
|
||||||
|
set(USE_OPENSSL ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(USE_WINSSL OFF)
|
set(USE_WINSSL OFF)
|
||||||
if("ssl" IN_LIST FEATURES)
|
if("winssl" IN_LIST FEATURES)
|
||||||
if(CURL_USE_WINSSL)
|
if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||||
set(USE_WINSSL ON)
|
message(FATAL_ERROR "winssl is not supported on non-Windows platforms")
|
||||||
else()
|
|
||||||
set(USE_OPENSSL ON)
|
|
||||||
endif()
|
endif()
|
||||||
|
set(USE_WINSSL ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(USE_MBEDTLS OFF)
|
||||||
|
if("mbedtls" IN_LIST FEATURES)
|
||||||
|
set(USE_MBEDTLS ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# SSH
|
# SSH
|
||||||
@ -64,7 +72,7 @@ endif()
|
|||||||
|
|
||||||
vcpkg_find_acquire_program(PERL)
|
vcpkg_find_acquire_program(PERL)
|
||||||
get_filename_component(PERL_PATH ${PERL} DIRECTORY)
|
get_filename_component(PERL_PATH ${PERL} DIRECTORY)
|
||||||
set(ENV{PATH} "$ENV{PATH};${PERL_PATH}")
|
vcpkg_add_to_path(${PERL_PATH})
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
@ -78,6 +86,7 @@ vcpkg_configure_cmake(
|
|||||||
-DCURL_STATICLIB=${CURL_STATICLIB}
|
-DCURL_STATICLIB=${CURL_STATICLIB}
|
||||||
-DCMAKE_USE_OPENSSL=${USE_OPENSSL}
|
-DCMAKE_USE_OPENSSL=${USE_OPENSSL}
|
||||||
-DCMAKE_USE_WINSSL=${USE_WINSSL}
|
-DCMAKE_USE_WINSSL=${USE_WINSSL}
|
||||||
|
-DCMAKE_USE_MBEDTLS=${USE_MBEDTLS}
|
||||||
-DCMAKE_USE_LIBSSH2=${USE_LIBSSH2}
|
-DCMAKE_USE_LIBSSH2=${USE_LIBSSH2}
|
||||||
-DHTTP_ONLY=${USE_HTTP_ONLY}
|
-DHTTP_ONLY=${USE_HTTP_ONLY}
|
||||||
OPTIONS_RELEASE
|
OPTIONS_RELEASE
|
||||||
|
Loading…
Reference in New Issue
Block a user