Skip to content

Commit a436838

Browse files
Tor Didriksendahlerlend
authored andcommitted
Bug#37389565 CURL UPDATE TO AT LEAST 8.11.1 [patches]
Update CURL_VERSION_DIR Changes to curl cmake files: - cmake_minimum_required - CMAKE_DEBUG_POSTFIX - Keep FILE protocol for HTTP_ONLY - find_package(OpenSSL) - optional_dependency(ZLIB) to reuse results from cmake/zlib.cmake - Do not add "/MP" for clang on Windows - Disable the ALIAS CURL::libcurl Change-Id: I3c7efaaaa9e5ed5e16eea38b90e69cd9811fc57a
1 parent 3b0d554 commit a436838

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

cmake/curl.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ FUNCTION(FIND_SYSTEM_CURL ARG_CURL_INCLUDE_DIR)
127127
ENDIF()
128128
ENDFUNCTION(FIND_SYSTEM_CURL)
129129

130-
SET(CURL_VERSION_DIR "curl-8.9.1")
130+
SET(CURL_VERSION_DIR "curl-8.11.1")
131131
FUNCTION(MYSQL_USE_BUNDLED_CURL CURL_INCLUDE_DIR)
132132
SET(WITH_CURL "bundled" CACHE STRING "Bundled curl library")
133133
ADD_SUBDIRECTORY(extra/curl)

extra/curl/curl-8.11.1/CMakeLists.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# to ON or OFF), the symbol detection is skipped. If the variable is
4444
# NOT DEFINED, the symbol detection is performed.
4545

46-
cmake_minimum_required(VERSION 3.7...3.16 FATAL_ERROR)
46+
# cmake_minimum_required(VERSION 3.7...3.16 FATAL_ERROR)
4747
message(STATUS "Using CMake version ${CMAKE_VERSION}")
4848

4949
# Collect command-line arguments for buildinfo.txt.
@@ -243,7 +243,7 @@ endif()
243243

244244
# For debug libs and exes, add "-d" postfix
245245
if(NOT DEFINED CMAKE_DEBUG_POSTFIX)
246-
set(CMAKE_DEBUG_POSTFIX "-d")
246+
# set(CMAKE_DEBUG_POSTFIX "-d")
247247
endif()
248248

249249
set(LIB_STATIC "libcurl_static")
@@ -402,7 +402,7 @@ mark_as_advanced(HTTP_ONLY)
402402

403403
if(HTTP_ONLY)
404404
set(CURL_DISABLE_DICT ON)
405-
set(CURL_DISABLE_FILE ON)
405+
# set(CURL_DISABLE_FILE ON) Keep the FILE protocol
406406
set(CURL_DISABLE_FTP ON)
407407
set(CURL_DISABLE_GOPHER ON)
408408
set(CURL_DISABLE_IMAP ON)
@@ -631,7 +631,7 @@ if(_use_core_foundation_and_core_services)
631631
endif()
632632

633633
if(CURL_USE_OPENSSL)
634-
find_package(OpenSSL REQUIRED)
634+
# find_package(OpenSSL REQUIRED)
635635
set(_ssl_enabled ON)
636636
set(USE_OPENSSL ON)
637637

@@ -773,7 +773,8 @@ endif()
773773
# and before calling openssl_check_symbol_exists().
774774

775775
set(HAVE_LIBZ OFF)
776-
curl_dependency_option(ZLIB)
776+
# Use result from cmake/zlib.cmake
777+
# curl_dependency_option(ZLIB)
777778
if(ZLIB_FOUND)
778779
set(HAVE_LIBZ ON)
779780

@@ -1823,7 +1824,7 @@ if(MSVC)
18231824
endif()
18241825

18251826
# Use multithreaded compilation on VS 2008+
1826-
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND MSVC_VERSION GREATER_EQUAL 1500)
1827+
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND MSVC_VERSION GREATER_EQUAL 1500 AND NOT WIN32_CLANG)
18271828
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
18281829
endif()
18291830
endif()

extra/curl/curl-8.11.1/lib/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,11 @@ if(BUILD_SHARED_LIBS)
264264
endif()
265265
endif()
266266

267+
# Here we do: add_library(libcurl ALIAS libcurl_static})
267268
add_library(${LIB_NAME} ALIAS ${LIB_SELECTED})
268-
add_library(${PROJECT_NAME}::${LIB_NAME} ALIAS ${LIB_SELECTED})
269+
# Here we do: add_library(CURL::libcurl ALIAS libcurl_static)
270+
# Disable it, we want all projects to use ext::curl (alias curl_interface)
271+
# add_library(${PROJECT_NAME}::${LIB_NAME} ALIAS ${LIB_SELECTED})
269272

270273
if(CURL_ENABLE_EXPORT_TARGET)
271274
if(BUILD_STATIC_LIBS)

0 commit comments

Comments
 (0)