mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Remove unbundled curl support
This commit is contained in:
parent
e8c2052367
commit
4f4ec8912b
@ -487,7 +487,6 @@ message (STATUS
|
|||||||
include (GNUInstallDirs)
|
include (GNUInstallDirs)
|
||||||
|
|
||||||
include (cmake/find/llvm.cmake)
|
include (cmake/find/llvm.cmake)
|
||||||
include (cmake/find/curl.cmake)
|
|
||||||
include (cmake/find/s3.cmake)
|
include (cmake/find/s3.cmake)
|
||||||
include (cmake/find/nlp.cmake)
|
include (cmake/find/nlp.cmake)
|
||||||
include (cmake/find/sentry.cmake)
|
include (cmake/find/sentry.cmake)
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
option (ENABLE_CURL "Enable curl" ${ENABLE_LIBRARIES})
|
|
||||||
|
|
||||||
if (NOT ENABLE_CURL)
|
|
||||||
if (USE_INTERNAL_CURL)
|
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal curl with ENABLE_CURL=OFF")
|
|
||||||
endif()
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
option (USE_INTERNAL_CURL "Use internal curl library" ON)
|
|
||||||
|
|
||||||
if (NOT USE_INTERNAL_CURL)
|
|
||||||
find_package (CURL)
|
|
||||||
if (NOT CURL_FOUND)
|
|
||||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system curl")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT CURL_FOUND)
|
|
||||||
set (USE_INTERNAL_CURL 1)
|
|
||||||
set (CURL_LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/curl")
|
|
||||||
|
|
||||||
# find_package(CURL) compatibility for the following packages that uses
|
|
||||||
# find_package(CURL)/include(FindCURL):
|
|
||||||
# - sentry-native
|
|
||||||
set (CURL_FOUND ON CACHE BOOL "")
|
|
||||||
set (CURL_ROOT_DIR ${CURL_LIBRARY_DIR} CACHE PATH "")
|
|
||||||
set (CURL_INCLUDE_DIR ${CURL_LIBRARY_DIR}/include CACHE PATH "")
|
|
||||||
set (CURL_INCLUDE_DIRS ${CURL_LIBRARY_DIR}/include CACHE PATH "")
|
|
||||||
set (CURL_LIBRARY curl CACHE STRING "")
|
|
||||||
set (CURL_LIBRARIES ${CURL_LIBRARY} CACHE STRING "")
|
|
||||||
set (CURL_VERSION_STRING 7.67.0 CACHE STRING "")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
message (STATUS "Using curl: ${CURL_INCLUDE_DIRS} : ${CURL_LIBRARIES}")
|
|
@ -72,8 +72,8 @@ if (TARGET OpenSSL::SSL)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Originally, on Windows azure-core is built with winhttp by default
|
# Originally, on Windows azure-core is built with winhttp by default
|
||||||
if (CURL_FOUND)
|
if (TARGET ch_contrib::curl)
|
||||||
target_link_libraries(_azure_sdk PRIVATE ${CURL_LIBRARY})
|
target_link_libraries(_azure_sdk PRIVATE ch_contrib::curl)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(_azure_sdk PRIVATE ch_contrib::libxml2)
|
target_link_libraries(_azure_sdk PRIVATE ch_contrib::libxml2)
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
if (NOT USE_INTERNAL_CURL)
|
option (ENABLE_CURL "Enable curl" ${ENABLE_LIBRARIES})
|
||||||
|
|
||||||
|
if (NOT ENABLE_CURL)
|
||||||
|
message(STATUS "Not using curl")
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -166,8 +169,6 @@ target_compile_options (curl PRIVATE -g0)
|
|||||||
|
|
||||||
# find_package(CURL) compatibility for the following packages that uses
|
# find_package(CURL) compatibility for the following packages that uses
|
||||||
# find_package(CURL)/include(FindCURL):
|
# find_package(CURL)/include(FindCURL):
|
||||||
# - mariadb-connector-c
|
|
||||||
# - aws-s3-cmake
|
|
||||||
# - sentry-native
|
# - sentry-native
|
||||||
set (CURL_FOUND ON CACHE BOOL "")
|
set (CURL_FOUND ON CACHE BOOL "")
|
||||||
set (CURL_ROOT_DIR ${LIBRARY_DIR} CACHE PATH "")
|
set (CURL_ROOT_DIR ${LIBRARY_DIR} CACHE PATH "")
|
||||||
@ -176,4 +177,5 @@ set (CURL_INCLUDE_DIRS "${LIBRARY_DIR}/include" CACHE PATH "")
|
|||||||
set (CURL_LIBRARY curl CACHE STRING "")
|
set (CURL_LIBRARY curl CACHE STRING "")
|
||||||
set (CURL_LIBRARIES ${CURL_LIBRARY} CACHE STRING "")
|
set (CURL_LIBRARIES ${CURL_LIBRARY} CACHE STRING "")
|
||||||
set (CURL_VERSION_STRING 7.67.0 CACHE STRING "")
|
set (CURL_VERSION_STRING 7.67.0 CACHE STRING "")
|
||||||
add_library (CURL::libcurl ALIAS ${CURL_LIBRARY})
|
# add_library (CURL::libcurl ALIAS ${CURL_LIBRARY})
|
||||||
|
add_library (ch_contrib::curl ALIAS ${CURL_LIBRARY})
|
||||||
|
@ -47,6 +47,6 @@ else()
|
|||||||
target_compile_definitions(sentry PUBLIC SENTRY_BUILD_STATIC)
|
target_compile_definitions(sentry PUBLIC SENTRY_BUILD_STATIC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(sentry PRIVATE curl pthread)
|
target_link_libraries(sentry PRIVATE ch_contrib::curl pthread)
|
||||||
target_include_directories(sentry PUBLIC "${SRC_DIR}/include" PRIVATE "${SRC_DIR}/src")
|
target_include_directories(sentry PUBLIC "${SRC_DIR}/include" PRIVATE "${SRC_DIR}/src")
|
||||||
target_compile_definitions(sentry PRIVATE SENTRY_WITH_INPROC_BACKEND SIZEOF_LONG=8)
|
target_compile_definitions(sentry PRIVATE SENTRY_WITH_INPROC_BACKEND SIZEOF_LONG=8)
|
||||||
|
Loading…
Reference in New Issue
Block a user