mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Remove unbundled openssl/boringssl (crypo/ssl) support
This commit is contained in:
parent
8485abd52b
commit
cf30669cc9
@ -490,7 +490,6 @@ include (GNUInstallDirs)
|
||||
include (cmake/contrib_finder.cmake)
|
||||
|
||||
find_contrib_lib(double-conversion) # Must be before parquet
|
||||
include (cmake/find/ssl.cmake)
|
||||
include (cmake/find/ldap.cmake) # after ssl
|
||||
include (cmake/find/icu.cmake)
|
||||
include (cmake/find/xz.cmake)
|
||||
|
@ -17,7 +17,7 @@ if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/AMQP-CPP/src")
|
||||
endif ()
|
||||
|
||||
set (USE_AMQPCPP 1)
|
||||
set (AMQPCPP_LIBRARY amqp-cpp ${OPENSSL_LIBRARIES})
|
||||
set (AMQPCPP_LIBRARY amqp-cpp OpenSSL::Crypto OpenSSL::SSL)
|
||||
|
||||
set (AMQPCPP_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/AMQP-CPP/include")
|
||||
list (APPEND AMQPCPP_INCLUDE_DIR
|
||||
|
@ -33,11 +33,11 @@ if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/grpc/CMakeLists.txt")
|
||||
set(MISSING_INTERNAL_GRPC_LIBRARY 1)
|
||||
endif()
|
||||
|
||||
if(USE_SSL)
|
||||
#if(USE_SSL)
|
||||
set(gRPC_USE_UNSECURE_LIBRARIES FALSE)
|
||||
else()
|
||||
set(gRPC_USE_UNSECURE_LIBRARIES TRUE)
|
||||
endif()
|
||||
#else()
|
||||
# set(gRPC_USE_UNSECURE_LIBRARIES TRUE)
|
||||
#endif()
|
||||
|
||||
if(NOT USE_INTERNAL_GRPC_LIBRARY)
|
||||
find_package(gRPC)
|
||||
|
@ -70,9 +70,9 @@ if (NOT OPENLDAP_FOUND AND NOT MISSING_INTERNAL_LDAP_LIBRARY)
|
||||
if (NOT _ldap_supported_platform)
|
||||
message (WARNING "LDAP support using the bundled library is not implemented for ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR} platform.")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot enable LDAP support")
|
||||
elseif (NOT USE_SSL)
|
||||
message (WARNING "LDAP support using the bundled library is not possible if SSL is not used.")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot enable LDAP support")
|
||||
#elseif (NOT TARGET OpenSSL::SSL)
|
||||
# message (WARNING "LDAP support using the bundled library is not possible if SSL is not used.")
|
||||
# message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot enable LDAP support")
|
||||
else ()
|
||||
set (USE_INTERNAL_LDAP_LIBRARY 1)
|
||||
set (OPENLDAP_ROOT_DIR "${ClickHouse_SOURCE_DIR}/contrib/openldap")
|
||||
|
@ -1,4 +1,4 @@
|
||||
if(OS_LINUX AND OPENSSL_FOUND)
|
||||
if(OS_LINUX AND TARGET OpenSSL::SSL)
|
||||
option(ENABLE_MYSQL "Enable MySQL" ${ENABLE_LIBRARIES})
|
||||
else ()
|
||||
option(ENABLE_MYSQL "Enable MySQL" FALSE)
|
||||
|
@ -7,13 +7,13 @@ if (ENABLE_S2_GEOMETRY)
|
||||
set (ENABLE_S2_GEOMETRY 0)
|
||||
set (USE_S2_GEOMETRY 0)
|
||||
else()
|
||||
if (OPENSSL_FOUND)
|
||||
#if (TARGET OpenSSL::SSL)
|
||||
set (S2_GEOMETRY_LIBRARY s2)
|
||||
set (S2_GEOMETRY_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/s2geometry/src/s2)
|
||||
set (USE_S2_GEOMETRY 1)
|
||||
else()
|
||||
message (WARNING "S2 uses OpenSSL, but the latter is absent.")
|
||||
endif()
|
||||
#else()
|
||||
# message (WARNING "S2 uses OpenSSL, but the latter is absent.")
|
||||
#endif()
|
||||
endif()
|
||||
|
||||
if (NOT USE_S2_GEOMETRY)
|
||||
|
@ -1,133 +0,0 @@
|
||||
# Needed when securely connecting to an external server, e.g.
|
||||
# clickhouse-client --host ... --secure
|
||||
option(ENABLE_SSL "Enable ssl" ${ENABLE_LIBRARIES})
|
||||
|
||||
if(NOT ENABLE_SSL)
|
||||
if (USE_INTERNAL_SSL_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal ssl library with ENABLE_SSL=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
option(USE_INTERNAL_SSL_LIBRARY "Set to FALSE to use system *ssl library instead of bundled" ON)
|
||||
|
||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/boringssl/README.md")
|
||||
if(USE_INTERNAL_SSL_LIBRARY)
|
||||
message(WARNING "submodule contrib/boringssl is missing. to fix try run: \n git submodule update --init")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal ssl library")
|
||||
endif()
|
||||
set(USE_INTERNAL_SSL_LIBRARY 0)
|
||||
set(MISSING_INTERNAL_SSL_LIBRARY 1)
|
||||
endif()
|
||||
|
||||
set (OPENSSL_USE_STATIC_LIBS ${USE_STATIC_LIBRARIES})
|
||||
|
||||
if (NOT USE_INTERNAL_SSL_LIBRARY)
|
||||
if (APPLE)
|
||||
set (OPENSSL_ROOT_DIR "/usr/local/opt/openssl" CACHE INTERNAL "")
|
||||
# https://rt.openssl.org/Ticket/Display.html?user=guest&pass=guest&id=2232
|
||||
if (USE_STATIC_LIBRARIES)
|
||||
message(WARNING "Disable USE_STATIC_LIBRARIES if you have linking problems with OpenSSL on MacOS")
|
||||
endif ()
|
||||
endif ()
|
||||
find_package (OpenSSL)
|
||||
|
||||
if (NOT OPENSSL_FOUND)
|
||||
# Try to find manually.
|
||||
set (OPENSSL_INCLUDE_PATHS "/usr/local/opt/openssl/include")
|
||||
set (OPENSSL_PATHS "/usr/local/opt/openssl/lib")
|
||||
find_path (OPENSSL_INCLUDE_DIR NAMES openssl/ssl.h PATHS ${OPENSSL_INCLUDE_PATHS})
|
||||
find_library (OPENSSL_SSL_LIBRARY ssl PATHS ${OPENSSL_PATHS})
|
||||
find_library (OPENSSL_CRYPTO_LIBRARY crypto PATHS ${OPENSSL_PATHS})
|
||||
if (OPENSSL_SSL_LIBRARY AND OPENSSL_CRYPTO_LIBRARY AND OPENSSL_INCLUDE_DIR)
|
||||
set (OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
|
||||
set (OPENSSL_FOUND 1)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT OPENSSL_FOUND)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system ssl")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (NOT OPENSSL_FOUND AND NOT MISSING_INTERNAL_SSL_LIBRARY)
|
||||
set (USE_INTERNAL_SSL_LIBRARY 1)
|
||||
set (OPENSSL_ROOT_DIR "${ClickHouse_SOURCE_DIR}/contrib/boringssl")
|
||||
set (OPENSSL_INCLUDE_DIR "${OPENSSL_ROOT_DIR}/include")
|
||||
set (OPENSSL_CRYPTO_LIBRARY crypto)
|
||||
set (OPENSSL_SSL_LIBRARY ssl)
|
||||
set (OPENSSL_FOUND 1)
|
||||
set (OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
|
||||
endif ()
|
||||
|
||||
if(OPENSSL_FOUND)
|
||||
# we need keep OPENSSL_FOUND for many libs in contrib
|
||||
set(USE_SSL 1)
|
||||
endif()
|
||||
|
||||
# used by new poco
|
||||
# part from /usr/share/cmake-*/Modules/FindOpenSSL.cmake, with removed all "EXISTS "
|
||||
if(OPENSSL_FOUND AND NOT USE_INTERNAL_SSL_LIBRARY)
|
||||
if(NOT TARGET OpenSSL::Crypto AND
|
||||
(OPENSSL_CRYPTO_LIBRARY OR
|
||||
LIB_EAY_LIBRARY_DEBUG OR
|
||||
LIB_EAY_LIBRARY_RELEASE)
|
||||
)
|
||||
add_library(OpenSSL::Crypto UNKNOWN IMPORTED)
|
||||
set_target_properties(OpenSSL::Crypto PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OPENSSL_INCLUDE_DIR}")
|
||||
if(OPENSSL_CRYPTO_LIBRARY)
|
||||
set_target_properties(OpenSSL::Crypto PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${OPENSSL_CRYPTO_LIBRARY}")
|
||||
endif()
|
||||
if(LIB_EAY_LIBRARY_RELEASE)
|
||||
set_property(TARGET OpenSSL::Crypto APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(OpenSSL::Crypto PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
|
||||
IMPORTED_LOCATION_RELEASE "${LIB_EAY_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
if(LIB_EAY_LIBRARY_DEBUG)
|
||||
set_property(TARGET OpenSSL::Crypto APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG)
|
||||
set_target_properties(OpenSSL::Crypto PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C"
|
||||
IMPORTED_LOCATION_DEBUG "${LIB_EAY_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT TARGET OpenSSL::SSL AND
|
||||
(OPENSSL_SSL_LIBRARY OR
|
||||
SSL_EAY_LIBRARY_DEBUG OR
|
||||
SSL_EAY_LIBRARY_RELEASE)
|
||||
)
|
||||
add_library(OpenSSL::SSL UNKNOWN IMPORTED)
|
||||
set_target_properties(OpenSSL::SSL PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OPENSSL_INCLUDE_DIR}")
|
||||
if(OPENSSL_SSL_LIBRARY)
|
||||
set_target_properties(OpenSSL::SSL PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
|
||||
IMPORTED_LOCATION "${OPENSSL_SSL_LIBRARY}")
|
||||
endif()
|
||||
if(SSL_EAY_LIBRARY_RELEASE)
|
||||
set_property(TARGET OpenSSL::SSL APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(OpenSSL::SSL PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
|
||||
IMPORTED_LOCATION_RELEASE "${SSL_EAY_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
if(SSL_EAY_LIBRARY_DEBUG)
|
||||
set_property(TARGET OpenSSL::SSL APPEND PROPERTY
|
||||
IMPORTED_CONFIGURATIONS DEBUG)
|
||||
set_target_properties(OpenSSL::SSL PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C"
|
||||
IMPORTED_LOCATION_DEBUG "${SSL_EAY_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
if(TARGET OpenSSL::Crypto)
|
||||
set_target_properties(OpenSSL::SSL PROPERTIES
|
||||
INTERFACE_LINK_LIBRARIES OpenSSL::Crypto)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message (STATUS "Using ssl=${USE_SSL}: ${OPENSSL_INCLUDE_DIR} : ${OPENSSL_LIBRARIES}")
|
8
contrib/CMakeLists.txt
vendored
8
contrib/CMakeLists.txt
vendored
@ -54,6 +54,7 @@ if (USE_INTERNAL_XZ_LIBRARY)
|
||||
add_subdirectory (xz-cmake)
|
||||
endif()
|
||||
|
||||
add_subdirectory (boringssl-cmake)
|
||||
add_subdirectory (poco-cmake)
|
||||
add_subdirectory (croaring-cmake)
|
||||
add_subdirectory (zstd-cmake)
|
||||
@ -91,13 +92,6 @@ if (USE_INTERNAL_H3_LIBRARY)
|
||||
add_subdirectory(h3-cmake)
|
||||
endif ()
|
||||
|
||||
if (USE_INTERNAL_SSL_LIBRARY)
|
||||
add_subdirectory (boringssl-cmake)
|
||||
|
||||
add_library(OpenSSL::Crypto ALIAS crypto)
|
||||
add_library(OpenSSL::SSL ALIAS ssl)
|
||||
endif ()
|
||||
|
||||
if (USE_INTERNAL_LDAP_LIBRARY)
|
||||
add_subdirectory (openldap-cmake)
|
||||
endif ()
|
||||
|
@ -41,4 +41,4 @@ target_compile_options (amqp-cpp
|
||||
)
|
||||
|
||||
target_include_directories (amqp-cpp SYSTEM PUBLIC "${LIBRARY_DIR}/include")
|
||||
target_link_libraries(amqp-cpp PUBLIC ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
|
||||
target_link_libraries(amqp-cpp PUBLIC OpenSSL::Crypto OpenSSL::SSL)
|
||||
|
@ -435,16 +435,14 @@ add_library(ch_contrib::parquet ALIAS _parquet)
|
||||
target_include_directories(_parquet SYSTEM BEFORE
|
||||
PUBLIC
|
||||
"${ClickHouse_SOURCE_DIR}/contrib/arrow/cpp/src"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cpp/src"
|
||||
PRIVATE
|
||||
${OPENSSL_INCLUDE_DIR})
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cpp/src")
|
||||
target_link_libraries(_parquet
|
||||
PUBLIC _arrow
|
||||
PRIVATE
|
||||
ch_contrib::thrift
|
||||
boost::headers_only
|
||||
boost::regex
|
||||
${OPENSSL_LIBRARIES})
|
||||
OpenSSL::Crypto OpenSSL::SSL)
|
||||
|
||||
if (SANITIZE STREQUAL "undefined")
|
||||
target_compile_options(_parquet PRIVATE -fno-sanitize=undefined)
|
||||
|
@ -95,9 +95,9 @@ target_compile_definitions(aws_s3 PUBLIC "AWS_SDK_VERSION_MINOR=7")
|
||||
target_compile_definitions(aws_s3 PUBLIC "AWS_SDK_VERSION_PATCH=231")
|
||||
target_include_directories(aws_s3 SYSTEM PUBLIC ${S3_INCLUDES})
|
||||
|
||||
if (OPENSSL_FOUND)
|
||||
if (TARGET OpenSSL::SSL)
|
||||
target_compile_definitions(aws_s3 PUBLIC -DENABLE_OPENSSL_ENCRYPTION)
|
||||
target_link_libraries(aws_s3 PRIVATE ${OPENSSL_LIBRARIES})
|
||||
target_link_libraries(aws_s3 PRIVATE OpenSSL::Crypto OpenSSL::SSL)
|
||||
endif()
|
||||
|
||||
target_link_libraries(aws_s3 PRIVATE aws_s3_checksums)
|
||||
|
@ -60,8 +60,8 @@ if (COMPILER_CLANG)
|
||||
endif()
|
||||
|
||||
# Originally, on Windows azure-core is built with bcrypt and crypt32 by default
|
||||
if (OPENSSL_FOUND)
|
||||
target_link_libraries(azure_sdk PRIVATE ${OPENSSL_LIBRARIES})
|
||||
if (TARGET OpenSSL::SSL)
|
||||
target_link_libraries(azure_sdk PRIVATE OpenSSL::Crypto OpenSSL::SSL)
|
||||
endif()
|
||||
|
||||
# Originally, on Windows azure-core is built with winhttp by default
|
||||
|
@ -1,3 +1,13 @@
|
||||
# Needed for:
|
||||
# - securely connecting to an external server, e.g. clickhouse-client --host ... --secure
|
||||
# - lots of thirdparty libraries
|
||||
option(ENABLE_SSL "Enable ssl" ${ENABLE_LIBRARIES})
|
||||
|
||||
if(NOT ENABLE_SSL)
|
||||
message(STATUS "Not using openssl")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Copyright (c) 2019 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
@ -677,3 +687,6 @@ target_include_directories(crypto SYSTEM PUBLIC "${BORINGSSL_SOURCE_DIR}/include
|
||||
target_include_directories(ssl SYSTEM PUBLIC "${BORINGSSL_SOURCE_DIR}/include")
|
||||
|
||||
target_compile_options(crypto PRIVATE -Wno-gnu-anonymous-struct)
|
||||
|
||||
add_library(OpenSSL::Crypto ALIAS crypto)
|
||||
add_library(OpenSSL::SSL ALIAS ssl)
|
||||
|
@ -31,8 +31,8 @@ set(_gRPC_PROTOBUF_PROTOC_LIBRARIES "${Protobuf_PROTOC_LIBRARY}")
|
||||
|
||||
# Use OpenSSL from ClickHouse contrib, not from gRPC third_party.
|
||||
set(gRPC_SSL_PROVIDER "clickhouse" CACHE STRING "" FORCE)
|
||||
set(_gRPC_SSL_INCLUDE_DIR ${OPENSSL_INCLUDE_DIR})
|
||||
set(_gRPC_SSL_LIBRARIES ${OPENSSL_LIBRARIES})
|
||||
set(_gRPC_SSL_INCLUDE_DIR "")
|
||||
set(_gRPC_SSL_LIBRARIES OpenSSL::Crypto OpenSSL::SSL)
|
||||
|
||||
# Use abseil-cpp from ClickHouse contrib, not from gRPC third_party.
|
||||
set(gRPC_ABSL_PROVIDER "clickhouse" CACHE STRING "" FORCE)
|
||||
|
@ -664,7 +664,6 @@ target_include_directories(${KRB5_LIBRARY} PRIVATE
|
||||
"${KRB5_SOURCE_DIR}/lib/krb5/rcache"
|
||||
"${KRB5_SOURCE_DIR}/lib/krb5/unicode"
|
||||
"${KRB5_SOURCE_DIR}/lib/krb5/os"
|
||||
# ${OPENSSL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
target_compile_definitions(${KRB5_LIBRARY} PRIVATE
|
||||
@ -677,6 +676,4 @@ target_compile_definitions(${KRB5_LIBRARY} PRIVATE
|
||||
LIBDIR="/usr/local/lib"
|
||||
)
|
||||
|
||||
target_link_libraries(${KRB5_LIBRARY}
|
||||
PRIVATE ${OPENSSL_CRYPTO_LIBRARY}
|
||||
)
|
||||
target_link_libraries(${KRB5_LIBRARY} PRIVATE OpenSSL::Crypto OpenSSL::SSL)
|
||||
|
@ -116,8 +116,6 @@ target_link_libraries(hdfs3 PRIVATE ${LIBXML2_LIBRARIES})
|
||||
# inherit from parent cmake
|
||||
target_include_directories(hdfs3 PRIVATE ${Protobuf_INCLUDE_DIR})
|
||||
target_link_libraries(hdfs3 PRIVATE ${Protobuf_LIBRARY} boost::headers_only)
|
||||
|
||||
if(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
|
||||
target_include_directories(hdfs3 PRIVATE ${OPENSSL_INCLUDE_DIR})
|
||||
target_link_libraries(hdfs3 PRIVATE ${OPENSSL_LIBRARIES})
|
||||
if (TARGET OpenSSL::SSL)
|
||||
target_link_libraries(hdfs3 PRIVATE OpenSSL::Crypto OpenSSL::SSL)
|
||||
endif()
|
||||
|
@ -93,8 +93,7 @@ set(HAVE_THREADS 1)
|
||||
set(DEFAULT_CHARSET "utf8mb4")
|
||||
|
||||
add_definitions(-DHAVE_OPENSSL -DHAVE_TLS)
|
||||
set(SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
|
||||
include_directories(BEFORE ${OPENSSL_INCLUDE_DIR})
|
||||
set(SSL_LIBRARIES OpenSSL::Crypto OpenSSL::SSL)
|
||||
set(TLS_LIBRARY_VERSION "OpenSSL ${OPENSSL_VERSION}")
|
||||
|
||||
set(ENABLED_LOCAL_INFILE OFF)
|
||||
|
@ -32,7 +32,7 @@ set(SRCS
|
||||
add_library(nuraft ${SRCS})
|
||||
|
||||
|
||||
if (NOT OPENSSL_SSL_LIBRARY OR NOT OPENSSL_CRYPTO_LIBRARY)
|
||||
if(NOT TARGET OpenSSL::Crypto)
|
||||
target_compile_definitions(nuraft PRIVATE USE_BOOST_ASIO=1 BOOST_ASIO_STANDALONE=1 SSL_LIBRARY_NOT_FOUND=1)
|
||||
else()
|
||||
target_compile_definitions(nuraft PRIVATE USE_BOOST_ASIO=1 BOOST_ASIO_STANDALONE=1)
|
||||
@ -44,8 +44,8 @@ target_include_directories (nuraft SYSTEM PRIVATE "${ClickHouse_SOURCE_DIR}/cont
|
||||
|
||||
target_link_libraries (nuraft PRIVATE boost::headers_only boost::coroutine)
|
||||
|
||||
if(OPENSSL_SSL_LIBRARY AND OPENSSL_CRYPTO_LIBRARY)
|
||||
target_link_libraries (nuraft PRIVATE ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
|
||||
if(TARGET OpenSSL::Crypto)
|
||||
target_link_libraries (nuraft PRIVATE OpenSSL::Crypto OpenSSL::SSL)
|
||||
endif()
|
||||
|
||||
target_include_directories (nuraft SYSTEM PUBLIC "${LIBRARY_DIR}/include")
|
||||
|
@ -57,14 +57,13 @@ add_library(lber ${_libs_type}
|
||||
)
|
||||
|
||||
target_link_libraries(lber
|
||||
PRIVATE ${OPENSSL_LIBRARIES}
|
||||
PRIVATE OpenSSL::Crypto OpenSSL::SSL
|
||||
)
|
||||
|
||||
target_include_directories(lber
|
||||
PRIVATE ${_extra_build_dir}/include
|
||||
PRIVATE "${OPENLDAP_SOURCE_DIR}/include"
|
||||
PRIVATE "${OPENLDAP_SOURCE_DIR}/libraries/liblber"
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
target_compile_definitions(lber
|
||||
@ -148,14 +147,13 @@ add_library(ldap ${_libs_type}
|
||||
|
||||
target_link_libraries(ldap
|
||||
PRIVATE lber
|
||||
PRIVATE ${OPENSSL_LIBRARIES}
|
||||
PRIVATE OpenSSL::Crypto OpenSSL::SSL
|
||||
)
|
||||
|
||||
target_include_directories(ldap
|
||||
PRIVATE ${_extra_build_dir}/include
|
||||
PRIVATE "${OPENLDAP_SOURCE_DIR}/include"
|
||||
PRIVATE "${OPENLDAP_SOURCE_DIR}/libraries/libldap"
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
target_compile_definitions(ldap
|
||||
@ -185,7 +183,7 @@ add_library(ldap_r ${_libs_type}
|
||||
|
||||
target_link_libraries(ldap_r
|
||||
PRIVATE lber
|
||||
PRIVATE ${OPENSSL_LIBRARIES}
|
||||
PRIVATE OpenSSL::Crypto OpenSSL::SSL
|
||||
)
|
||||
|
||||
target_include_directories(ldap_r
|
||||
@ -193,7 +191,6 @@ target_include_directories(ldap_r
|
||||
PRIVATE "${OPENLDAP_SOURCE_DIR}/include"
|
||||
PRIVATE "${OPENLDAP_SOURCE_DIR}/libraries/libldap_r"
|
||||
PRIVATE "${OPENLDAP_SOURCE_DIR}/libraries/libldap"
|
||||
PRIVATE ${OPENSSL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
target_compile_definitions(ldap_r
|
||||
|
@ -111,8 +111,8 @@ set(S2_SRCS
|
||||
add_library(s2 ${S2_SRCS})
|
||||
set_property(TARGET s2 PROPERTY CXX_STANDARD 17)
|
||||
|
||||
if (OPENSSL_FOUND)
|
||||
target_link_libraries(s2 PRIVATE ${OPENSSL_LIBRARIES})
|
||||
if (TARGET OpenSSL::SSL)
|
||||
target_link_libraries(s2 PRIVATE OpenSSL::Crypto OpenSSL::SSL)
|
||||
endif()
|
||||
|
||||
# Copied from contrib/s2geometry/CMakeLists
|
||||
|
@ -416,9 +416,9 @@ if (TARGET ch_contrib::avrocpp)
|
||||
dbms_target_link_libraries(PRIVATE ch_contrib::avrocpp)
|
||||
endif ()
|
||||
|
||||
if (OPENSSL_CRYPTO_LIBRARY)
|
||||
dbms_target_link_libraries (PRIVATE ${OPENSSL_CRYPTO_LIBRARY})
|
||||
target_link_libraries (clickhouse_common_io PRIVATE ${OPENSSL_CRYPTO_LIBRARY})
|
||||
if (TARGET OpenSSL::Crypto)
|
||||
dbms_target_link_libraries (PRIVATE OpenSSL::Crypto)
|
||||
target_link_libraries (clickhouse_common_io PRIVATE OpenSSL::Crypto)
|
||||
endif ()
|
||||
|
||||
if (USE_LDAP)
|
||||
|
@ -1,7 +1,7 @@
|
||||
add_executable (hashes_test hashes_test.cpp)
|
||||
target_link_libraries (hashes_test PRIVATE clickhouse_common_io ${CITYHASH_LIBRARIES})
|
||||
if(OPENSSL_CRYPTO_LIBRARY)
|
||||
target_link_libraries (hashes_test PRIVATE ${OPENSSL_CRYPTO_LIBRARY})
|
||||
if (TARGET OpenSSL::Crypto)
|
||||
target_link_libraries (hashes_test PRIVATE OpenSSL::Crypto)
|
||||
endif()
|
||||
|
||||
add_executable (sip_hash_perf sip_hash_perf.cpp)
|
||||
|
@ -10,9 +10,6 @@ target_link_libraries (string_ref_hash PRIVATE clickhouse_common_io)
|
||||
|
||||
add_executable (mysql_protocol mysql_protocol.cpp)
|
||||
target_link_libraries (mysql_protocol PRIVATE dbms)
|
||||
if(USE_SSL)
|
||||
target_include_directories (mysql_protocol SYSTEM PRIVATE ${OPENSSL_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
add_executable (coro coro.cpp)
|
||||
target_link_libraries (coro PRIVATE clickhouse_common_io)
|
||||
|
@ -30,8 +30,8 @@ target_link_libraries(clickhouse_functions
|
||||
divide_impl
|
||||
)
|
||||
|
||||
if (OPENSSL_CRYPTO_LIBRARY)
|
||||
target_link_libraries(clickhouse_functions PUBLIC ${OPENSSL_CRYPTO_LIBRARY})
|
||||
if (TARGET OpenSSL::Crypto)
|
||||
target_link_libraries(clickhouse_functions PUBLIC OpenSSL::Crypto)
|
||||
endif()
|
||||
|
||||
target_include_directories(clickhouse_functions SYSTEM PRIVATE ${SPARSEHASH_INCLUDE_DIR})
|
||||
|
@ -13,3 +13,6 @@ endif()
|
||||
if (TARGET ch_contrib::rdkafka)
|
||||
set(USE_RDKAFKA 1)
|
||||
endif()
|
||||
if (TARGET OpenSSL::SSL)
|
||||
set(USE_SSL 1)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user