mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 10:19:20 +00:00
Meta: Remove curl overlay port
The http3 feature is now upstream, so we no longer need an overlay port to use it.
This commit is contained in:
parent
43c1b1b434
commit
a04f2d0796
Notes:
github-actions[bot]
2025-08-19 20:10:20 +00:00
Author: https://github.com/Lubrsi
Commit: a04f2d0796
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5916
Reviewed-by: https://github.com/gmta ✅
8 changed files with 1 additions and 742 deletions
|
@ -1,8 +0,0 @@
|
|||
if(ANDROID AND ANDROID_NATIVE_API_LEVEL LESS 24)
|
||||
# https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md
|
||||
set(HAVE_FILE_OFFSET_BITS FALSE CACHE INTERNAL "")
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
add_compile_definitions(_WINSOCK_DEPRECATED_NO_WARNINGS)
|
||||
endif()
|
|
@ -1,148 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 86add74..be7b193 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -345,7 +345,7 @@ set(LIBCURL_PC_REQUIRES_PRIVATE "")
|
||||
if(ENABLE_ARES)
|
||||
set(USE_ARES 1)
|
||||
find_package(Cares REQUIRED)
|
||||
- list(APPEND CURL_LIBS ${CARES_LIBRARIES})
|
||||
+ list(APPEND CURL_LIBS ${CARES_LINK_LIBRARIES})
|
||||
list(APPEND CURL_LIBDIRS ${CARES_LIBRARY_DIRS})
|
||||
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE ${CARES_PC_REQUIRES})
|
||||
include_directories(SYSTEM ${CARES_INCLUDE_DIRS})
|
||||
@@ -789,7 +789,7 @@ if(CURL_USE_MBEDTLS)
|
||||
find_package(MbedTLS REQUIRED)
|
||||
set(_ssl_enabled ON)
|
||||
set(USE_MBEDTLS ON)
|
||||
- list(APPEND CURL_LIBS ${MBEDTLS_LIBRARIES})
|
||||
+ list(APPEND CURL_LIBS ${MBEDTLS_LINK_LIBRARIES})
|
||||
list(APPEND CURL_LIBDIRS ${MBEDTLS_LIBRARY_DIRS})
|
||||
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE ${MBEDTLS_PC_REQUIRES})
|
||||
include_directories(SYSTEM ${MBEDTLS_INCLUDE_DIRS})
|
||||
@@ -823,7 +823,7 @@ if(CURL_USE_WOLFSSL)
|
||||
find_package(WolfSSL REQUIRED)
|
||||
set(_ssl_enabled ON)
|
||||
set(USE_WOLFSSL ON)
|
||||
- list(APPEND CURL_LIBS ${WOLFSSL_LIBRARIES})
|
||||
+ list(APPEND CURL_LIBS ${WOLFSSL_LINK_LIBRARIES})
|
||||
list(APPEND CURL_LIBDIRS ${WOLFSSL_LIBRARY_DIRS})
|
||||
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE ${WOLFSSL_PC_REQUIRES})
|
||||
include_directories(SYSTEM ${WOLFSSL_INCLUDE_DIRS})
|
||||
@@ -856,7 +856,7 @@ if(CURL_USE_GNUTLS)
|
||||
find_package(Nettle REQUIRED)
|
||||
set(_ssl_enabled ON)
|
||||
set(USE_GNUTLS ON)
|
||||
- list(APPEND CURL_LIBS ${GNUTLS_LIBRARIES} ${NETTLE_LIBRARIES})
|
||||
+ list(APPEND CURL_LIBS ${GNUTLS_LINK_LIBRARIES} ${NETTLE_LINK_LIBRARIES})
|
||||
list(APPEND CURL_LIBDIRS ${GNUTLS_LIBRARY_DIRS} ${NETTLE_LIBRARY_DIRS})
|
||||
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "gnutls" ${NETTLE_PC_REQUIRES})
|
||||
include_directories(SYSTEM ${GNUTLS_INCLUDE_DIRS} ${NETTLE_INCLUDE_DIRS})
|
||||
@@ -919,7 +919,7 @@ set(HAVE_BROTLI OFF)
|
||||
curl_dependency_option(CURL_BROTLI Brotli "brotli")
|
||||
if(BROTLI_FOUND)
|
||||
set(HAVE_BROTLI ON)
|
||||
- list(APPEND CURL_LIBS ${BROTLI_LIBRARIES})
|
||||
+ list(APPEND CURL_LIBS ${BROTLI_LINK_LIBRARIES})
|
||||
list(APPEND CURL_LIBDIRS ${BROTLI_LIBRARY_DIRS})
|
||||
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE ${BROTLI_PC_REQUIRES})
|
||||
include_directories(SYSTEM ${BROTLI_INCLUDE_DIRS})
|
||||
@@ -934,7 +934,7 @@ curl_dependency_option(CURL_ZSTD Zstd "zstd")
|
||||
if(ZSTD_FOUND)
|
||||
if(ZSTD_VERSION VERSION_GREATER_EQUAL 1.0.0)
|
||||
set(HAVE_ZSTD ON)
|
||||
- list(APPEND CURL_LIBS ${ZSTD_LIBRARIES})
|
||||
+ list(APPEND CURL_LIBS ${ZSTD_LINK_LIBRARIES})
|
||||
list(APPEND CURL_LIBDIRS ${ZSTD_LIBRARY_DIRS})
|
||||
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE ${ZSTD_PC_REQUIRES})
|
||||
include_directories(SYSTEM ${ZSTD_INCLUDE_DIRS})
|
||||
@@ -1052,7 +1052,7 @@ option(USE_NGHTTP2 "Use nghttp2 library" ON)
|
||||
if(USE_NGHTTP2)
|
||||
find_package(NGHTTP2)
|
||||
if(NGHTTP2_FOUND)
|
||||
- list(APPEND CURL_LIBS ${NGHTTP2_LIBRARIES})
|
||||
+ list(APPEND CURL_LIBS ${NGHTTP2_LINK_LIBRARIES})
|
||||
list(APPEND CURL_LIBDIRS ${NGHTTP2_LIBRARY_DIRS})
|
||||
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE ${NGHTTP2_PC_REQUIRES})
|
||||
include_directories(SYSTEM ${NGHTTP2_INCLUDE_DIRS})
|
||||
@@ -1084,7 +1084,7 @@ if(USE_NGTCP2)
|
||||
else()
|
||||
message(FATAL_ERROR "ngtcp2 requires a supported TLS-backend")
|
||||
endif()
|
||||
- list(APPEND CURL_LIBS ${NGTCP2_LIBRARIES})
|
||||
+ list(APPEND CURL_LIBS ${NGTCP2_LINK_LIBRARIES})
|
||||
list(APPEND CURL_LIBDIRS ${NGTCP2_LIBRARY_DIRS})
|
||||
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE ${NGTCP2_PC_REQUIRES})
|
||||
include_directories(SYSTEM ${NGTCP2_INCLUDE_DIRS})
|
||||
@@ -1095,7 +1095,7 @@ if(USE_NGTCP2)
|
||||
|
||||
find_package(NGHTTP3 REQUIRED)
|
||||
set(USE_NGHTTP3 ON)
|
||||
- list(APPEND CURL_LIBS ${NGHTTP3_LIBRARIES})
|
||||
+ list(APPEND CURL_LIBS ${NGHTTP3_LINK_LIBRARIES})
|
||||
list(APPEND CURL_LIBDIRS ${NGHTTP3_LIBRARY_DIRS})
|
||||
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE ${NGHTTP3_PC_REQUIRES})
|
||||
include_directories(SYSTEM ${NGHTTP3_INCLUDE_DIRS})
|
||||
@@ -1196,7 +1196,7 @@ if(NOT CURL_DISABLE_LDAP)
|
||||
find_package(LDAP)
|
||||
if(LDAP_FOUND)
|
||||
set(HAVE_LBER_H 1)
|
||||
- set(CURL_LIBS ${LDAP_LIBRARIES} ${CURL_LIBS})
|
||||
+ list(PREPEND CURL_LIBS ${LDAP_LINK_LIBRARIES})
|
||||
list(APPEND CURL_LIBDIRS ${LDAP_LIBRARY_DIRS})
|
||||
if(LDAP_PC_REQUIRES)
|
||||
set(LIBCURL_PC_REQUIRES_PRIVATE ${LDAP_PC_REQUIRES} ${LIBCURL_PC_REQUIRES_PRIVATE})
|
||||
@@ -1273,7 +1273,7 @@ set(HAVE_LIBIDN2 OFF)
|
||||
if(USE_LIBIDN2 AND NOT USE_APPLE_IDN AND NOT USE_WIN32_IDN)
|
||||
find_package(Libidn2)
|
||||
if(LIBIDN2_FOUND)
|
||||
- set(CURL_LIBS ${LIBIDN2_LIBRARIES} ${CURL_LIBS})
|
||||
+ list(PREPEND CURL_LIBS ${LIBIDN2_LINK_LIBRARIES})
|
||||
list(APPEND CURL_LIBDIRS ${LIBIDN2_LIBRARY_DIRS})
|
||||
set(LIBCURL_PC_REQUIRES_PRIVATE ${LIBIDN2_PC_REQUIRES} ${LIBCURL_PC_REQUIRES_PRIVATE})
|
||||
include_directories(SYSTEM ${LIBIDN2_INCLUDE_DIRS})
|
||||
@@ -1293,7 +1293,7 @@ set(USE_LIBPSL OFF)
|
||||
|
||||
if(CURL_USE_LIBPSL)
|
||||
find_package(Libpsl REQUIRED)
|
||||
- list(APPEND CURL_LIBS ${LIBPSL_LIBRARIES})
|
||||
+ list(APPEND CURL_LIBS ${LIBPSL_LINK_LIBRARIES})
|
||||
list(APPEND CURL_LIBDIRS ${LIBPSL_LIBRARY_DIRS})
|
||||
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE ${LIBPSL_PC_REQUIRES})
|
||||
include_directories(SYSTEM ${LIBPSL_INCLUDE_DIRS})
|
||||
@@ -1312,7 +1312,7 @@ set(USE_LIBSSH2 OFF)
|
||||
if(CURL_USE_LIBSSH2)
|
||||
find_package(Libssh2)
|
||||
if(LIBSSH2_FOUND)
|
||||
- set(CURL_LIBS ${LIBSSH2_LIBRARIES} ${CURL_LIBS}) # keep it before TLS-crypto, compression
|
||||
+ list(PREPEND CURL_LIBS ${LIBSSH2_LINK_LIBRARIES}) # keep it before TLS-crypto, compression
|
||||
list(APPEND CURL_LIBDIRS ${LIBSSH2_LIBRARY_DIRS})
|
||||
set(LIBCURL_PC_REQUIRES_PRIVATE ${LIBSSH2_PC_REQUIRES} ${LIBCURL_PC_REQUIRES_PRIVATE})
|
||||
include_directories(SYSTEM ${LIBSSH2_INCLUDE_DIRS})
|
||||
@@ -1361,7 +1361,7 @@ option(CURL_USE_GSASL "Use libgsasl" OFF)
|
||||
mark_as_advanced(CURL_USE_GSASL)
|
||||
if(CURL_USE_GSASL)
|
||||
find_package(Libgsasl REQUIRED)
|
||||
- list(APPEND CURL_LIBS ${LIBGSASL_LIBRARIES})
|
||||
+ list(APPEND CURL_LIBS ${LIBGSASL_LINK_LIBRARIES})
|
||||
list(APPEND CURL_LIBDIRS ${LIBGSASL_LIBRARY_DIRS})
|
||||
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE ${LIBGSASL_PC_REQUIRES})
|
||||
include_directories(SYSTEM ${LIBGSASL_INCLUDE_DIRS})
|
||||
@@ -1380,7 +1380,7 @@ if(CURL_USE_GSSAPI)
|
||||
|
||||
set(HAVE_GSSAPI ${GSS_FOUND})
|
||||
if(GSS_FOUND)
|
||||
- list(APPEND CURL_LIBS ${GSS_LIBRARIES})
|
||||
+ list(APPEND CURL_LIBS ${_gss_LINK_LIBRARIES})
|
||||
list(APPEND CURL_LIBDIRS ${GSS_LIBRARY_DIRS})
|
||||
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE ${GSS_PC_REQUIRES})
|
||||
include_directories(SYSTEM ${GSS_INCLUDE_DIRS})
|
||||
@@ -1451,7 +1451,7 @@ endif()
|
||||
option(USE_LIBRTMP "Enable librtmp from rtmpdump" OFF)
|
||||
if(USE_LIBRTMP)
|
||||
find_package(Librtmp REQUIRED)
|
||||
- list(APPEND CURL_LIBS ${LIBRTMP_LIBRARIES})
|
||||
+ list(APPEND CURL_LIBS ${LIBRTMP_LINK_LIBRARIES})
|
||||
list(APPEND CURL_LIBDIRS ${LIBRTMP_LIBRARY_DIRS})
|
||||
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE ${LIBRTMP_PC_REQUIRES})
|
||||
include_directories(SYSTEM ${LIBRTMP_INCLUDE_DIRS})
|
|
@ -1,106 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index be7b193..a3f5918 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -2280,7 +2280,30 @@ if(NOT CURL_DISABLE_INSTALL)
|
||||
set(_implicit_libs "${CMAKE_C_IMPLICIT_LINK_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
- foreach(_lib IN LISTS _implicit_libs _custom_libs CURL_LIBS)
|
||||
+ find_package(PkgConfig)
|
||||
+ pkg_check_modules(CURL_PC_REQUIRED REQUIRED ${LIBCURL_PC_REQUIRES_PRIVATE})
|
||||
+ # Libs which are resolved by pkg-config via Requires (LIBCURL_PC_REQUIRES_PRIVATE)
|
||||
+ # don't need to be written to `libcurl.pc` (LIBCURL_PC_LIBS_PRIVATE),
|
||||
+ # but still need to be written `to curl-config` (CURL_CONFIG_LIBS_PRIVATE)
|
||||
+ set(CURL_CONFIG_LIBS_PRIVATE "")
|
||||
+
|
||||
+ # Imported multi-config targets in CURL_LIBS can't be exported easily to
|
||||
+ # `libcurl.pc` and `curl-config`. Export link libraries as used by pkg-config.
|
||||
+ set(curl_libs "${CURL_LIBS}")
|
||||
+ if(ZLIB::ZLIB IN_LIST CURL_LIBS)
|
||||
+ pkg_check_modules(CURL_PC_ZLIB REQUIRED zlib)
|
||||
+ string(REPLACE "ZLIB::ZLIB" "${CURL_PC_ZLIB_LINK_LIBRARIES}" curl_libs "${curl_libs}")
|
||||
+ endif()
|
||||
+ if(OpenSSL::SSL IN_LIST CURL_LIBS)
|
||||
+ pkg_check_modules(CURL_PC_LIBSSL REQUIRED libssl)
|
||||
+ string(REPLACE "OpenSSL::SSL" "${CURL_PC_LIBSSL_LINK_LIBRARIES}" curl_libs "${curl_libs}")
|
||||
+ endif()
|
||||
+ if(OpenSSL::Crypto IN_LIST CURL_LIBS)
|
||||
+ pkg_check_modules(CURL_PC_LIBCRYPTO REQUIRED libcrypto)
|
||||
+ string(REPLACE "OpenSSL::Crypto" "${CURL_PC_LIBCRYPTO_LINK_LIBRARIES}" curl_libs "${curl_libs}")
|
||||
+ endif()
|
||||
+
|
||||
+ foreach(_lib IN LISTS _custom_libs curl_libs)
|
||||
if(TARGET "${_lib}")
|
||||
set(_libname "${_lib}")
|
||||
get_target_property(_imported "${_libname}" IMPORTED)
|
||||
@@ -2295,6 +2318,10 @@ if(NOT CURL_DISABLE_INSTALL)
|
||||
continue()
|
||||
endif()
|
||||
endif()
|
||||
+ set(out_list LIBCURL_PC_LIBS_PRIVATE)
|
||||
+ if(_lib IN_LIST CURL_PC_REQUIRED_LINK_LIBRARIES)
|
||||
+ set(out_list CURL_CONFIG_LIBS_PRIVATE)
|
||||
+ endif()
|
||||
if(_lib MATCHES "^-") # '-framework <name>'
|
||||
list(APPEND _ldflags "${_lib}")
|
||||
elseif(_lib MATCHES "/")
|
||||
@@ -2311,12 +2338,18 @@ if(NOT CURL_DISABLE_INSTALL)
|
||||
list(APPEND _ldflags "-L${_libdir}")
|
||||
endif()
|
||||
string(REGEX REPLACE "^lib" "" _libname "${_libname}")
|
||||
- list(APPEND LIBCURL_PC_LIBS_PRIVATE "-l${_libname}")
|
||||
+ list(APPEND ${out_list} "-l${_libname}")
|
||||
+ if(TARGET "${LIB_STATIC}" AND _libdir IN_LIST CMAKE_C_IMPLICIT_LINK_DIRECTORIES)
|
||||
+ # Avoid absolute path to system lib in exported CMake config
|
||||
+ get_target_property(static_link_libs "${LIB_STATIC}" INTERFACE_LINK_LIBRARIES)
|
||||
+ string(REPLACE "${_lib}" "${_libname}" static_link_libs "${static_link_libs}")
|
||||
+ set_target_properties("${LIB_STATIC}" PROPERTIES INTERFACE_LINK_LIBRARIES "${static_link_libs}")
|
||||
+ endif()
|
||||
else()
|
||||
- list(APPEND LIBCURL_PC_LIBS_PRIVATE "${_lib}")
|
||||
+ list(APPEND ${out_list} "${_lib}")
|
||||
endif()
|
||||
else()
|
||||
- list(APPEND LIBCURL_PC_LIBS_PRIVATE "-l${_lib}")
|
||||
+ list(APPEND ${out_list} "-l${_lib}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
@@ -2342,11 +2375,11 @@ if(NOT CURL_DISABLE_INSTALL)
|
||||
set(LIBCURL_PC_REQUIRES "")
|
||||
set(LIBCURL_PC_LIBS "")
|
||||
set(LIBCURL_PC_CFLAGS "")
|
||||
+ set(CURL_CONFIG_LIBS_PRIVATE "")
|
||||
else()
|
||||
+ string(REPLACE ";" " " CURL_CONFIG_LIBS_PRIVATE "${CURL_CONFIG_LIBS_PRIVATE}")
|
||||
set(ENABLE_SHARED "no")
|
||||
- set(LIBCURL_PC_REQUIRES "${LIBCURL_PC_REQUIRES_PRIVATE}")
|
||||
- set(LIBCURL_PC_LIBS "${LIBCURL_PC_LIBS_PRIVATE}")
|
||||
- set(LIBCURL_PC_CFLAGS "${LIBCURL_PC_CFLAGS_PRIVATE}")
|
||||
+ # (processing by vcpkg_fixup_pkgconfig)
|
||||
endif()
|
||||
if(BUILD_STATIC_LIBS)
|
||||
set(ENABLE_STATIC "yes")
|
||||
diff --git a/curl-config.in b/curl-config.in
|
||||
index 5518416..c0c29da 100644
|
||||
--- a/curl-config.in
|
||||
+++ b/curl-config.in
|
||||
@@ -155,7 +155,7 @@ while test "$#" -gt 0; do
|
||||
curllibdir=''
|
||||
fi
|
||||
if test 'X@ENABLE_SHARED@' = 'Xno'; then
|
||||
- echo "${curllibdir}-lcurl @LIBCURL_PC_LIBS_PRIVATE@"
|
||||
+ echo "@libdir@/libcurl.@libext@ @LIBCURL_PC_LDFLAGS_PRIVATE@ @CURL_CONFIG_LIBS_PRIVATE@ @LIBCURL_PC_LIBS_PRIVATE@"
|
||||
else
|
||||
echo "${curllibdir}-lcurl"
|
||||
fi
|
||||
@@ -167,7 +167,7 @@ while test "$#" -gt 0; do
|
||||
|
||||
--static-libs)
|
||||
if test 'X@ENABLE_STATIC@' != 'Xno'; then
|
||||
- echo "@libdir@/libcurl.@libext@ @LIBCURL_PC_LDFLAGS_PRIVATE@ @LIBCURL_PC_LIBS_PRIVATE@"
|
||||
+ echo "@libdir@/libcurl.@libext@ @LIBCURL_PC_LDFLAGS_PRIVATE@ @CURL_CONFIG_LIBS_PRIVATE@ @LIBCURL_PC_LIBS_PRIVATE@"
|
||||
else
|
||||
echo 'curl was built with static libraries disabled' >&2
|
||||
exit 1
|
|
@ -1,148 +0,0 @@
|
|||
string(REPLACE "." "_" curl_version "curl-${VERSION}")
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO curl/curl
|
||||
REF ${curl_version}
|
||||
SHA512 d4a560e225d0110133f44ed57cf5394c1710530c5fec395d02baafaac9ea2186dd543047ae27fd7542894b8744070760516ae611602105b1b40605abbf84e684
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
dependencies.patch
|
||||
pkgconfig-curl-config.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
http2 USE_NGHTTP2
|
||||
http3 USE_NGTCP2
|
||||
wolfssl CURL_USE_WOLFSSL
|
||||
openssl CURL_USE_OPENSSL
|
||||
mbedtls CURL_USE_MBEDTLS
|
||||
ssh CURL_USE_LIBSSH2
|
||||
tool BUILD_CURL_EXE
|
||||
c-ares ENABLE_ARES
|
||||
sspi CURL_WINDOWS_SSPI
|
||||
brotli CURL_BROTLI
|
||||
schannel CURL_USE_SCHANNEL
|
||||
idn2 USE_LIBIDN2
|
||||
winidn USE_WIN32_IDN
|
||||
zstd CURL_ZSTD
|
||||
psl CURL_USE_LIBPSL
|
||||
gssapi CURL_USE_GSSAPI
|
||||
gsasl CURL_USE_GSASL
|
||||
gnutls CURL_USE_GNUTLS
|
||||
rtmp USE_LIBRTMP
|
||||
httpsrr USE_HTTPSRR
|
||||
ssls-export USE_SSLS_EXPORT
|
||||
INVERTED_FEATURES
|
||||
ldap CURL_DISABLE_LDAP
|
||||
ldap CURL_DISABLE_LDAPS
|
||||
non-http HTTP_ONLY
|
||||
websockets CURL_DISABLE_WEBSOCKETS
|
||||
)
|
||||
|
||||
set(OPTIONS "")
|
||||
|
||||
if("sectransp" IN_LIST FEATURES)
|
||||
list(APPEND OPTIONS -DCURL_CA_PATH=none -DCURL_CA_BUNDLE=none)
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_UWP)
|
||||
list(APPEND OPTIONS
|
||||
-DCURL_DISABLE_TELNET=ON
|
||||
-DENABLE_UNIX_SOCKETS=OFF
|
||||
)
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
list(APPEND OPTIONS -DENABLE_UNICODE=ON)
|
||||
endif()
|
||||
|
||||
vcpkg_find_acquire_program(PKGCONFIG)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
"-DCMAKE_PROJECT_INCLUDE=${CMAKE_CURRENT_LIST_DIR}/cmake-project-include.cmake"
|
||||
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
|
||||
${FEATURE_OPTIONS}
|
||||
${OPTIONS}
|
||||
-DBUILD_TESTING=OFF
|
||||
-DENABLE_CURL_MANUAL=OFF
|
||||
-DIMPORT_LIB_SUFFIX= # empty
|
||||
-DSHARE_LIB_OBJECT=OFF
|
||||
-DCURL_CA_FALLBACK=ON
|
||||
-DCURL_USE_PKGCONFIG=ON
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Perl=ON
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
PKG_CONFIG_EXECUTABLE
|
||||
)
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if ("tool" IN_LIST FEATURES)
|
||||
vcpkg_copy_tools(TOOL_NAMES curl AUTO_CLEAN)
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/CURL)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
set(namespec "curl")
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
set(namespec "libcurl")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libcurl.pc" " -lcurl" " -l${namespec}")
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libcurl.pc" " -lcurl" " -l${namespec}-d")
|
||||
endif()
|
||||
|
||||
#Fix install path
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/curl-config" "${CURRENT_PACKAGES_DIR}" "\${prefix}")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/curl-config" "${CURRENT_INSTALLED_DIR}" "\${prefix}" IGNORE_UNCHANGED)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/bin/curl-config" "\nprefix='\${prefix}'" [=[prefix=$(CDPATH= cd -- "$(dirname -- "$0")"/../../.. && pwd -P)]=])
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/curl-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/curl-config")
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/curl-config")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "${CURRENT_PACKAGES_DIR}" "\${prefix}")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "${CURRENT_INSTALLED_DIR}" "\${prefix}" IGNORE_UNCHANGED)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "\nprefix='\${prefix}/debug'" [=[prefix=$(CDPATH= cd -- "$(dirname -- "$0")"/../../../.. && pwd -P)]=])
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "\nexec_prefix=\"\${prefix}\"" "\nexec_prefix=\"\${prefix}/debug\"")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "-lcurl" "-l${namespec}-d")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "curl." "curl-d.")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/curl-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/curl-config")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/curl/curl.h"
|
||||
"#ifdef CURL_STATICLIB"
|
||||
"#if 1"
|
||||
)
|
||||
endif()
|
||||
|
||||
file(INSTALL "${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
file(READ "${SOURCE_PATH}/lib/krb5.c" krb5_c)
|
||||
string(REGEX REPLACE "#i.*" "" krb5_c "${krb5_c}")
|
||||
set(krb5_copyright "${CURRENT_BUILDTREES_DIR}/krb5.c Notice")
|
||||
file(WRITE "${krb5_copyright}" "${krb5_c}")
|
||||
|
||||
file(READ "${SOURCE_PATH}/lib/curlx/inet_ntop.c" inet_ntop_c)
|
||||
string(REGEX REPLACE "#i.*" "" inet_ntop_c "${inet_ntop_c}")
|
||||
set(inet_ntop_copyright "${CURRENT_BUILDTREES_DIR}/inet_ntop.c and inet_pton.c Notice")
|
||||
file(WRITE "${inet_ntop_copyright}" "${inet_ntop_c}")
|
||||
|
||||
vcpkg_install_copyright(
|
||||
FILE_LIST
|
||||
"${SOURCE_PATH}/COPYING"
|
||||
"${krb5_copyright}"
|
||||
"${inet_ntop_copyright}"
|
||||
)
|
|
@ -1,4 +0,0 @@
|
|||
curl is compatible with built-in CMake targets:
|
||||
|
||||
find_package(CURL REQUIRED)
|
||||
target_link_libraries(main PRIVATE CURL::libcurl)
|
|
@ -1,54 +0,0 @@
|
|||
list(REMOVE_ITEM ARGS "NO_MODULE" "CONFIG" "MODULE")
|
||||
_find_package(${ARGS} CONFIG)
|
||||
|
||||
if(CURL_FOUND)
|
||||
cmake_policy(PUSH)
|
||||
cmake_policy(SET CMP0012 NEW)
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
cmake_policy(SET CMP0057 NEW)
|
||||
|
||||
include("${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake")
|
||||
|
||||
set(_curl_target CURL::libcurl_shared)
|
||||
if(TARGET CURL::libcurl_static)
|
||||
set(_curl_target CURL::libcurl_static)
|
||||
endif()
|
||||
get_target_property(_curl_include_dirs ${_curl_target} INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_target_property(_curl_link_libraries ${_curl_target} INTERFACE_LINK_LIBRARIES)
|
||||
if(NOT _curl_link_libraries)
|
||||
set(_curl_link_libraries "")
|
||||
endif()
|
||||
if(_curl_link_libraries MATCHES "ZLIB::ZLIB")
|
||||
string(REGEX REPLACE "([\$]<[^;]*)?ZLIB::ZLIB([^;]*>)?" "${ZLIB_LIBRARIES}" _curl_link_libraries "${_curl_link_libraries}")
|
||||
endif()
|
||||
if(_curl_link_libraries MATCHES "OpenSSL::")
|
||||
string(REGEX REPLACE "([\$]<[^;]*)?OpenSSL::(SSL|Crypto)([^;]*>)?" "${OPENSSL_LIBRARIES}" _curl_link_libraries "${_curl_link_libraries}")
|
||||
endif()
|
||||
if(_curl_link_libraries MATCHES "::")
|
||||
message(WARNING "CURL_LIBRARIES list at least one target. This will not work for use cases where targets are not resolved.")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
get_target_property(_curl_location_debug ${_curl_target} IMPORTED_IMPLIB_DEBUG)
|
||||
get_target_property(_curl_location_release ${_curl_target} IMPORTED_IMPLIB_RELEASE)
|
||||
endif()
|
||||
|
||||
if(NOT _curl_location_debug AND NOT _curl_location_release)
|
||||
get_target_property(_curl_location_debug ${_curl_target} IMPORTED_LOCATION_DEBUG)
|
||||
get_target_property(_curl_location_release ${_curl_target} IMPORTED_LOCATION_RELEASE)
|
||||
endif()
|
||||
|
||||
set(CURL_INCLUDE_DIRS "${_curl_include_dirs}")
|
||||
set(CURL_LIBRARY_DEBUG "${_curl_location_debug}" CACHE INTERNAL "vcpkg")
|
||||
set(CURL_LIBRARY_RELEASE "${_curl_location_release}" CACHE INTERNAL "vcpkg")
|
||||
select_library_configurations(CURL)
|
||||
set(CURL_LIBRARIES ${CURL_LIBRARY} ${_curl_link_libraries})
|
||||
set(CURL_VERSION_STRING "${CURL_VERSION}")
|
||||
|
||||
unset(_curl_include_dirs)
|
||||
unset(_curl_link_libraries)
|
||||
unset(_curl_location_debug)
|
||||
unset(_curl_location_release)
|
||||
unset(_curl_target)
|
||||
cmake_policy(POP)
|
||||
endif()
|
|
@ -1,273 +0,0 @@
|
|||
{
|
||||
"name": "curl",
|
||||
"version": "8.15.0",
|
||||
"description": "A library for transferring data with URLs",
|
||||
"homepage": "https://curl.se/",
|
||||
"license": "curl AND ISC AND BSD-3-Clause",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
],
|
||||
"default-features": [
|
||||
"non-http",
|
||||
"ssl"
|
||||
],
|
||||
"features": {
|
||||
"brotli": {
|
||||
"description": "brotli support (brotli)",
|
||||
"dependencies": [
|
||||
"brotli"
|
||||
]
|
||||
},
|
||||
"c-ares": {
|
||||
"description": "c-ares support",
|
||||
"dependencies": [
|
||||
"c-ares"
|
||||
]
|
||||
},
|
||||
"gnutls": {
|
||||
"description": "SSL support (gnutls)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "libgnutls",
|
||||
"platform": "!windows | mingw"
|
||||
},
|
||||
{
|
||||
"name": "shiftmedia-libgnutls",
|
||||
"platform": "windows & !mingw"
|
||||
}
|
||||
]
|
||||
},
|
||||
"gsasl": {
|
||||
"description": "GSASL support (libgsasl)",
|
||||
"dependencies": [
|
||||
"gsasl"
|
||||
]
|
||||
},
|
||||
"gssapi": {
|
||||
"description": "krb5 support",
|
||||
"supports": "!windows",
|
||||
"dependencies": [
|
||||
"krb5"
|
||||
]
|
||||
},
|
||||
"http2": {
|
||||
"description": "HTTP2 support",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"openssl"
|
||||
]
|
||||
},
|
||||
"nghttp2"
|
||||
]
|
||||
},
|
||||
"http3": {
|
||||
"description": "HTTP3 support",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"openssl"
|
||||
]
|
||||
},
|
||||
"nghttp3",
|
||||
{
|
||||
"name": "ngtcp2",
|
||||
"features": [
|
||||
"openssl"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"httpsrr": {
|
||||
"description": "enable support for HTTPS RR"
|
||||
},
|
||||
"idn": {
|
||||
"description": "Default IDN support",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"winidn"
|
||||
],
|
||||
"platform": "windows"
|
||||
},
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"idn2"
|
||||
],
|
||||
"platform": "!windows"
|
||||
}
|
||||
]
|
||||
},
|
||||
"idn2": {
|
||||
"description": "idn2 support (libidn2)",
|
||||
"dependencies": [
|
||||
"libidn2"
|
||||
]
|
||||
},
|
||||
"ldap": {
|
||||
"description": "LDAP support",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"non-http"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "openldap",
|
||||
"platform": "!windows"
|
||||
}
|
||||
]
|
||||
},
|
||||
"mbedtls": {
|
||||
"description": "SSL support (mbedTLS)",
|
||||
"dependencies": [
|
||||
"mbedtls"
|
||||
]
|
||||
},
|
||||
"non-http": {
|
||||
"description": "Enables protocols beyond HTTP/HTTPS/HTTP2/HTTP3"
|
||||
},
|
||||
"openssl": {
|
||||
"description": "SSL support (OpenSSL)",
|
||||
"dependencies": [
|
||||
"openssl"
|
||||
]
|
||||
},
|
||||
"psl": {
|
||||
"description": "Use psl support (libpsl)",
|
||||
"dependencies": [
|
||||
"libpsl"
|
||||
]
|
||||
},
|
||||
"rtmp": {
|
||||
"description": "RTMP support",
|
||||
"dependencies": [
|
||||
"librtmp"
|
||||
]
|
||||
},
|
||||
"schannel": {
|
||||
"description": "SSL support (Secure Channel)",
|
||||
"supports": "windows & !uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"sspi"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"ssh": {
|
||||
"description": "SSH support via libssh2",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"non-http"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"openssl"
|
||||
]
|
||||
},
|
||||
"libssh2"
|
||||
]
|
||||
},
|
||||
"ssl": {
|
||||
"description": "Default SSL backend",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"schannel"
|
||||
],
|
||||
"platform": "(windows & !uwp) | mingw"
|
||||
},
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"openssl"
|
||||
],
|
||||
"platform": "(uwp | !windows) & !mingw"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ssls-export": {
|
||||
"description": "SSL session import/export",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"ssl"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sspi": {
|
||||
"description": "SSPI support",
|
||||
"supports": "windows & !uwp"
|
||||
},
|
||||
"tool": {
|
||||
"description": "Builds curl executable",
|
||||
"supports": "!uwp"
|
||||
},
|
||||
"websockets": {
|
||||
"description": "WebSocket support"
|
||||
},
|
||||
"winidn": {
|
||||
"description": "WinIDN support",
|
||||
"supports": "windows"
|
||||
},
|
||||
"winldap": {
|
||||
"description": "Obsolete. Use feature 'ldap' instead.",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "curl",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"ldap"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"wolfssl": {
|
||||
"description": "SSL support (wolfSSL)",
|
||||
"dependencies": [
|
||||
"wolfssl"
|
||||
]
|
||||
},
|
||||
"zstd": {
|
||||
"description": "ZStandard support (zstd)",
|
||||
"dependencies": [
|
||||
"zstd"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -179,7 +179,7 @@
|
|||
},
|
||||
{
|
||||
"name": "curl",
|
||||
"version": "8.15.0#0"
|
||||
"version": "8.15.0#1"
|
||||
},
|
||||
{
|
||||
"name": "dirent",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue