-
Notifications
You must be signed in to change notification settings - Fork 7.3k
[curl] Update to 8.18.0 #48563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[curl] Update to 8.18.0 #48563
Changes from 13 commits
83095ba
90498b5
f02a553
5d30fdc
1a5c8ef
24b2122
5721f93
02e263b
bce8a9e
1a06390
0c4981b
b9df94d
3ee4b12
70b09f4
e66f5bf
f892e62
bad3072
7e757f4
08e0574
882ef92
7be97cd
5c8f4b2
d5aa20b
f3a6918
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,17 @@ | ||
| list(REMOVE_ITEM ARGS "NO_MODULE" "CONFIG" "MODULE") | ||
| list(GET ARGS 0 _z_vcpg_curl_name) | ||
| _find_package(${ARGS} CONFIG) | ||
|
|
||
| if(CURL_FOUND) | ||
| if(${_z_vcpg_curl_name}_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 "") | ||
|
|
@@ -25,30 +23,31 @@ if(CURL_FOUND) | |
| 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() | ||
| # leave CURL_LIBRARIES as set by upstream (imported target) | ||
| message(WARNING "Cannot easily unroll CURL_LIBRARIES (\"${CURL_LIBRARIES}\") to filepaths. Exported CMake config must use \"find_dependency(CURL)\".") | ||
|
||
| else() | ||
| # resolve CURL_LIBRARIES to filepaths. | ||
| 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(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() | ||
|
|
||
| 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_LIBRARY_DEBUG "${_curl_location_debug}" CACHE INTERNAL "vcpkg") | ||
| set(CURL_LIBRARY_RELEASE "${_curl_location_release}" CACHE INTERNAL "vcpkg") | ||
| include("${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake") | ||
| select_library_configurations(CURL) | ||
| set(CURL_LIBRARIES ${CURL_LIBRARY} ${_curl_link_libraries}) | ||
|
|
||
| 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_link_libraries) | ||
| unset(_curl_location_debug) | ||
| unset(_curl_location_release) | ||
| endif() | ||
|
|
||
| unset(_curl_include_dirs) | ||
| unset(_curl_link_libraries) | ||
| unset(_curl_location_debug) | ||
| unset(_curl_location_release) | ||
| unset(_curl_target) | ||
| cmake_policy(POP) | ||
| endif() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| diff --git a/cmake/libssh2-config.cmake.in b/cmake/libssh2-config.cmake.in | ||
| index edc86d7..fd53d55 100644 | ||
| --- a/cmake/libssh2-config.cmake.in | ||
| +++ b/cmake/libssh2-config.cmake.in | ||
| @@ -22,10 +22,22 @@ include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake") | ||
|
|
||
| # Alias for either shared or static library | ||
| if(NOT TARGET @PROJECT_NAME@::@LIB_NAME@) | ||
| + if(CMAKE_VERSION VERSION_LESS "3.18.0") | ||
| + # cannot add alias to non-global imported library | ||
| + add_library(@PROJECT_NAME@::@LIB_NAME@ INTERFACE IMPORTED) | ||
| + set_target_properties(@PROJECT_NAME@::@LIB_NAME@ PROPERTIES INTERFACE_LINK_LIBRARIES @PROJECT_NAME@::@LIB_SELECTED@) | ||
| + else() | ||
| add_library(@PROJECT_NAME@::@LIB_NAME@ ALIAS @PROJECT_NAME@::@LIB_SELECTED@) | ||
| + endif() | ||
| endif() | ||
|
|
||
| # Compatibility alias | ||
| if(NOT TARGET Libssh2::@LIB_NAME@) | ||
| + if(CMAKE_VERSION VERSION_LESS "3.18.0") | ||
| + # cannot add alias to non-global imported library | ||
| + add_library(Libssh2::@LIB_NAME@ INTERFACE IMPORTED) | ||
| + set_target_properties(Libssh2::@LIB_NAME@ PROPERTIES INTERFACE_LINK_LIBRARIES @PROJECT_NAME@::@LIB_SELECTED@) | ||
| + else() | ||
| add_library(Libssh2::@LIB_NAME@ ALIAS @PROJECT_NAME@::@LIB_SELECTED@) | ||
| + endif() | ||
| endif() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| diff --git a/crypto/ossl/CMakeLists.txt b/crypto/ossl/CMakeLists.txt | ||
| index da2ef2df..1a108ada 100644 | ||
| --- a/crypto/ossl/CMakeLists.txt | ||
| +++ b/crypto/ossl/CMakeLists.txt | ||
| @@ -29,14 +29,11 @@ set(ngtcp2_crypto_ossl_SOURCES | ||
| ) | ||
|
|
||
| set(ngtcp2_crypto_ossl_INCLUDE_DIRS | ||
| - "${CMAKE_CURRENT_SOURCE_DIR}/../../lib/includes" | ||
| - "${CMAKE_CURRENT_BINARY_DIR}/../../lib/includes" | ||
| - "${CMAKE_CURRENT_SOURCE_DIR}/../../lib" | ||
| - "${CMAKE_CURRENT_SOURCE_DIR}/../../crypto/includes" | ||
| - "${CMAKE_CURRENT_BINARY_DIR}/../../crypto/includes" | ||
| - "${CMAKE_CURRENT_SOURCE_DIR}/../../crypto" | ||
| - "${CMAKE_CURRENT_BINARY_DIR}/../../crypto" | ||
| - "${OPENSSL_INCLUDE_DIRS}" | ||
| + "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/lib>" | ||
| + "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/crypto/includes>" | ||
| + "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/crypto/includes>" | ||
| + "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/crypto>" | ||
| + "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/crypto>" | ||
| ) | ||
|
|
||
| foreach(name libngtcp2_crypto_ossl.pc) | ||
| @@ -55,9 +52,10 @@ if(ENABLE_SHARED_LIB) | ||
| ) | ||
| target_include_directories(ngtcp2_crypto_ossl PUBLIC | ||
| ${ngtcp2_crypto_ossl_INCLUDE_DIRS}) | ||
| - target_link_libraries(ngtcp2_crypto_ossl ngtcp2 ${OPENSSL_LIBRARIES}) | ||
| + target_link_libraries(ngtcp2_crypto_ossl PUBLIC ngtcp2 OpenSSL::SSL) | ||
|
|
||
| install(TARGETS ngtcp2_crypto_ossl | ||
| + EXPORT "${PROJECT_NAME}Targets" | ||
| ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
| LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
| RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") | ||
| @@ -77,8 +75,10 @@ if(ENABLE_STATIC_LIB) | ||
| "-DNGTCP2_STATICLIB") | ||
| target_include_directories(ngtcp2_crypto_ossl_static PUBLIC | ||
| ${ngtcp2_crypto_ossl_INCLUDE_DIRS}) | ||
| + target_link_libraries(ngtcp2_crypto_ossl_static PUBLIC ngtcp2_static OpenSSL::SSL) | ||
|
|
||
| install(TARGETS ngtcp2_crypto_ossl_static | ||
| + EXPORT "${PROJECT_NAME}Targets" | ||
| DESTINATION "${CMAKE_INSTALL_LIBDIR}") | ||
| endif() | ||
|
|
||
| diff --git a/lib/config.cmake.in b/lib/config.cmake.in | ||
| index 435a4d4a..fffcd517 100644 | ||
| --- a/lib/config.cmake.in | ||
| +++ b/lib/config.cmake.in | ||
| @@ -1,3 +1,6 @@ | ||
| include(CMakeFindDependencyMacro) | ||
| +if("@HAVE_OSSL@") | ||
| + find_dependency(OpenSSL) | ||
| +endif() | ||
|
|
||
| include("${CMAKE_CURRENT_LIST_DIR}/@NGTCP2_TARGETS_EXPORT_NAME@.cmake") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this maybe include the port version like
vcpkg-2?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I don't want to read the manifest for an optional property.)
SOURCE_PATH(e.g.c-8_18_0-1-f780f9182e.clean->f780f9182e). It is unique for a combination of sources and patches.