if(WIN32)
list(APPEND CURL_LIBS "ws2_32" "bcrypt")
- if(USE_LIBRTMP)
- list(APPEND CURL_LIBS "winmm")
- endif()
endif()
# check SSL libraries
endif()
endif()
-# Check symbol in OpenSSL-like TLS backends.
-macro(openssl_check_symbol_exists SYMBOL FILES VARIABLE)
+# Check symbol in an OpenSSL-like TLS backend, or in EXTRA_LIBS depending on it.
+macro(openssl_check_symbol_exists SYMBOL FILES VARIABLE EXTRA_LIBS)
cmake_push_check_state()
if(USE_OPENSSL)
set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
endif()
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_UINTPTR_T) # to pull in stdint.h (as of wolfSSL v5.5.4)
endif()
+ if(NOT "${EXTRA_LIBS}" STREQUAL "")
+ list(APPEND CMAKE_REQUIRED_LIBRARIES "${EXTRA_LIBS}")
+ endif()
check_symbol_exists("${SYMBOL}" "${FILES}" "${VARIABLE}")
cmake_pop_check_state()
endmacro()
macro(openssl_check_quic)
if(NOT DEFINED HAVE_SSL_CTX_SET_QUIC_METHOD)
if(USE_OPENSSL)
- openssl_check_symbol_exists(SSL_CTX_set_quic_method "openssl/ssl.h" HAVE_SSL_CTX_SET_QUIC_METHOD)
+ openssl_check_symbol_exists(SSL_CTX_set_quic_method "openssl/ssl.h" HAVE_SSL_CTX_SET_QUIC_METHOD "")
elseif(USE_WOLFSSL)
- openssl_check_symbol_exists(wolfSSL_set_quic_method "wolfssl/options.h;wolfssl/openssl/ssl.h" HAVE_SSL_CTX_SET_QUIC_METHOD)
+ openssl_check_symbol_exists(wolfSSL_set_quic_method "wolfssl/options.h;wolfssl/openssl/ssl.h" HAVE_SSL_CTX_SET_QUIC_METHOD "")
endif()
endif()
if(NOT HAVE_SSL_CTX_SET_QUIC_METHOD)
if(USE_OPENSSL OR USE_WOLFSSL)
if(NOT DEFINED HAVE_SSL_SET0_WBIO)
- openssl_check_symbol_exists(SSL_set0_wbio "openssl/ssl.h" HAVE_SSL_SET0_WBIO)
+ openssl_check_symbol_exists(SSL_set0_wbio "openssl/ssl.h" HAVE_SSL_SET0_WBIO "")
endif()
if(NOT DEFINED HAVE_OPENSSL_SRP AND NOT CURL_DISABLE_SRP)
- openssl_check_symbol_exists(SSL_CTX_set_srp_username "openssl/ssl.h" HAVE_OPENSSL_SRP)
+ openssl_check_symbol_exists(SSL_CTX_set_srp_username "openssl/ssl.h" HAVE_OPENSSL_SRP "")
endif()
endif()
endif()
endif()
+option(USE_LIBRTMP "Enable librtmp from rtmpdump" OFF)
+if(USE_LIBRTMP)
+ cmake_push_check_state()
+ set(_extra_libs "rtmp")
+ if(WIN32)
+ list(APPEND _extra_libs "winmm")
+ endif()
+ openssl_check_symbol_exists("RTMP_Init" "librtmp/rtmp.h" HAVE_LIBRTMP "${_extra_libs}")
+ cmake_pop_check_state()
+ if(HAVE_LIBRTMP)
+ list(APPEND CURL_LIBS "rtmp")
+ if(WIN32)
+ list(APPEND CURL_LIBS "winmm")
+ endif()
+ else()
+ message(WARNING "librtmp requested, but not found or missing OpenSSL. Skipping.")
+ set(USE_LIBRTMP OFF)
+ endif()
+endif()
+
option(ENABLE_UNIX_SOCKETS "Define if you want Unix domain sockets support" ON)
if(ENABLE_UNIX_SOCKETS)
include(CheckStructHasMember)