# BEARSSL_INCLUDE_DIRS The bearssl include directories
# BEARSSL_LIBRARIES The bearssl library names
-# for compatibility. Configuration via BEARSSL_INCLUDE_DIRS is deprecated, use BEARSSL_INCLUDE_DIR instead.
if(DEFINED BEARSSL_INCLUDE_DIRS AND NOT DEFINED BEARSSL_INCLUDE_DIR)
+ message(WARNING "BEARSSL_INCLUDE_DIRS is deprecated, use BEARSSL_INCLUDE_DIR instead.")
set(BEARSSL_INCLUDE_DIR "${BEARSSL_INCLUDE_DIRS}")
unset(BEARSSL_INCLUDE_DIRS)
endif()
# MBEDTLS_LIBRARIES The mbedtls library names
# MBEDTLS_VERSION Version of mbedtls
-# for compatibility. Configuration via MBEDTLS_INCLUDE_DIRS is deprecated, use MBEDTLS_INCLUDE_DIR instead.
if(DEFINED MBEDTLS_INCLUDE_DIRS AND NOT DEFINED MBEDTLS_INCLUDE_DIR)
+ message(WARNING "MBEDTLS_INCLUDE_DIRS is deprecated, use MBEDTLS_INCLUDE_DIR instead.")
set(MBEDTLS_INCLUDE_DIR "${MBEDTLS_INCLUDE_DIRS}")
unset(MBEDTLS_INCLUDE_DIRS)
endif()
#
# Result Variables:
#
-# WolfSSL_FOUND System has wolfssl
-# WolfSSL_INCLUDE_DIRS The wolfssl include directories
-# WolfSSL_LIBRARIES The wolfssl library names
-# WolfSSL_VERSION Version of wolfssl
+# WOLFSSL_FOUND System has wolfssl
+# WOLFSSL_INCLUDE_DIRS The wolfssl include directories
+# WOLFSSL_LIBRARIES The wolfssl library names
+# WOLFSSL_VERSION Version of wolfssl
+
+if(DEFINED WolfSSL_INCLUDE_DIR AND NOT DEFINED WOLFSSL_INCLUDE_DIR)
+ message(WARNING "WolfSSL_INCLUDE_DIR is deprecated, use WOLFSSL_INCLUDE_DIR instead.")
+ set(WOLFSSL_INCLUDE_DIR "${WolfSSL_INCLUDE_DIR}")
+ unset(WolfSSL_INCLUDE_DIR)
+endif()
+if(DEFINED WolfSSL_LIBRARY AND NOT DEFINED WOLFSSL_LIBRARY)
+ message(WARNING "WolfSSL_LIBRARY is deprecated, use WOLFSSL_LIBRARY instead.")
+ set(WOLFSSL_LIBRARY "${WolfSSL_LIBRARY}")
+ unset(WolfSSL_LIBRARY)
+endif()
if(CURL_USE_PKGCONFIG)
find_package(PkgConfig QUIET)
pkg_check_modules(PC_WOLFSSL QUIET "wolfssl")
endif()
-find_path(WolfSSL_INCLUDE_DIR NAMES "wolfssl/ssl.h"
+find_path(WOLFSSL_INCLUDE_DIR NAMES "wolfssl/ssl.h"
HINTS
${PC_WOLFSSL_INCLUDEDIR}
${PC_WOLFSSL_INCLUDE_DIRS}
)
-find_library(WolfSSL_LIBRARY NAMES "wolfssl"
+find_library(WOLFSSL_LIBRARY NAMES "wolfssl"
HINTS
${PC_WOLFSSL_LIBDIR}
${PC_WOLFSSL_LIBRARY_DIRS}
)
if(PC_WOLFSSL_VERSION)
- set(WolfSSL_VERSION ${PC_WOLFSSL_VERSION})
-elseif(WolfSSL_INCLUDE_DIR AND EXISTS "${WolfSSL_INCLUDE_DIR}/wolfssl/version.h")
+ set(WOLFSSL_VERSION ${PC_WOLFSSL_VERSION})
+elseif(WOLFSSL_INCLUDE_DIR AND EXISTS "${WOLFSSL_INCLUDE_DIR}/wolfssl/version.h")
set(_version_regex "#[\t ]*define[\t ]+LIBWOLFSSL_VERSION_STRING[\t ]+\"([^\"]*)\"")
- file(STRINGS "${WolfSSL_INCLUDE_DIR}/wolfssl/version.h" _version_str REGEX "${_version_regex}")
+ file(STRINGS "${WOLFSSL_INCLUDE_DIR}/wolfssl/version.h" _version_str REGEX "${_version_regex}")
string(REGEX REPLACE "${_version_regex}" "\\1" _version_str "${_version_str}")
- set(WolfSSL_VERSION "${_version_str}")
+ set(WOLFSSL_VERSION "${_version_str}")
unset(_version_regex)
unset(_version_str)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(WolfSSL
REQUIRED_VARS
- WolfSSL_INCLUDE_DIR
- WolfSSL_LIBRARY
+ WOLFSSL_INCLUDE_DIR
+ WOLFSSL_LIBRARY
VERSION_VAR
- WolfSSL_VERSION
+ WOLFSSL_VERSION
)
-if(WolfSSL_FOUND)
- set(WolfSSL_INCLUDE_DIRS ${WolfSSL_INCLUDE_DIR})
- set(WolfSSL_LIBRARIES ${WolfSSL_LIBRARY})
+if(WOLFSSL_FOUND)
+ set(WOLFSSL_INCLUDE_DIRS ${WOLFSSL_INCLUDE_DIR})
+ set(WOLFSSL_LIBRARIES ${WOLFSSL_LIBRARY})
endif()
-mark_as_advanced(WolfSSL_INCLUDE_DIR WolfSSL_LIBRARY)
+mark_as_advanced(WOLFSSL_INCLUDE_DIR WOLFSSL_LIBRARY)
#
# Result Variables:
#
-# Zstd_FOUND System has zstd
-# Zstd_INCLUDE_DIRS The zstd include directories
-# Zstd_LIBRARIES The zstd library names
-# Zstd_VERSION Version of zstd
+# ZSTD_FOUND System has zstd
+# ZSTD_INCLUDE_DIRS The zstd include directories
+# ZSTD_LIBRARIES The zstd library names
+# ZSTD_VERSION Version of zstd
+
+if(DEFINED Zstd_INCLUDE_DIR AND NOT DEFINED ZSTD_INCLUDE_DIR)
+ message(WARNING "Zstd_INCLUDE_DIR is deprecated, use ZSTD_INCLUDE_DIR instead.")
+ set(ZSTD_INCLUDE_DIR "${Zstd_INCLUDE_DIR}")
+ unset(Zstd_INCLUDE_DIR)
+endif()
+if(DEFINED Zstd_LIBRARY AND NOT DEFINED ZSTD_LIBRARY)
+ message(WARNING "Zstd_LIBRARY is deprecated, use ZSTD_LIBRARY instead.")
+ set(ZSTD_LIBRARY "${Zstd_LIBRARY}")
+ unset(Zstd_LIBRARY)
+endif()
if(CURL_USE_PKGCONFIG)
find_package(PkgConfig QUIET)
- pkg_check_modules(PC_Zstd "libzstd")
+ pkg_check_modules(PC_ZSTD "libzstd")
endif()
-find_path(Zstd_INCLUDE_DIR "zstd.h"
+find_path(ZSTD_INCLUDE_DIR "zstd.h"
HINTS
- ${PC_Zstd_INCLUDEDIR}
- ${PC_Zstd_INCLUDE_DIRS}
+ ${PC_ZSTD_INCLUDEDIR}
+ ${PC_ZSTD_INCLUDE_DIRS}
)
-find_library(Zstd_LIBRARY NAMES "zstd"
+find_library(ZSTD_LIBRARY NAMES "zstd"
HINTS
- ${PC_Zstd_LIBDIR}
- ${PC_Zstd_LIBRARY_DIRS}
+ ${PC_ZSTD_LIBDIR}
+ ${PC_ZSTD_LIBRARY_DIRS}
)
-if(PC_Zstd_VERSION)
- set(Zstd_VERSION ${PC_Zstd_VERSION})
-elseif(Zstd_INCLUDE_DIR AND EXISTS "${Zstd_INCLUDE_DIR}/zstd.h")
+if(PC_ZSTD_VERSION)
+ set(ZSTD_VERSION ${PC_ZSTD_VERSION})
+elseif(ZSTD_INCLUDE_DIR AND EXISTS "${ZSTD_INCLUDE_DIR}/zstd.h")
set(_version_regex1 "#[\t ]*define[ \t]+ZSTD_VERSION_MAJOR[ \t]+([0-9]+).*")
set(_version_regex2 "#[\t ]*define[ \t]+ZSTD_VERSION_MINOR[ \t]+([0-9]+).*")
set(_version_regex3 "#[\t ]*define[ \t]+ZSTD_VERSION_RELEASE[ \t]+([0-9]+).*")
- file(STRINGS "${Zstd_INCLUDE_DIR}/zstd.h" _version_str1 REGEX "${_version_regex1}")
- file(STRINGS "${Zstd_INCLUDE_DIR}/zstd.h" _version_str2 REGEX "${_version_regex2}")
- file(STRINGS "${Zstd_INCLUDE_DIR}/zstd.h" _version_str3 REGEX "${_version_regex3}")
+ file(STRINGS "${ZSTD_INCLUDE_DIR}/zstd.h" _version_str1 REGEX "${_version_regex1}")
+ file(STRINGS "${ZSTD_INCLUDE_DIR}/zstd.h" _version_str2 REGEX "${_version_regex2}")
+ file(STRINGS "${ZSTD_INCLUDE_DIR}/zstd.h" _version_str3 REGEX "${_version_regex3}")
string(REGEX REPLACE "${_version_regex1}" "\\1" _version_str1 "${_version_str1}")
string(REGEX REPLACE "${_version_regex2}" "\\1" _version_str2 "${_version_str2}")
string(REGEX REPLACE "${_version_regex3}" "\\1" _version_str3 "${_version_str3}")
- set(Zstd_VERSION "${_version_str1}.${_version_str2}.${_version_str3}")
+ set(ZSTD_VERSION "${_version_str1}.${_version_str2}.${_version_str3}")
unset(_version_regex1)
unset(_version_regex2)
unset(_version_regex3)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Zstd
REQUIRED_VARS
- Zstd_INCLUDE_DIR
- Zstd_LIBRARY
+ ZSTD_INCLUDE_DIR
+ ZSTD_LIBRARY
VERSION_VAR
- Zstd_VERSION
+ ZSTD_VERSION
)
-if(Zstd_FOUND)
- set(Zstd_INCLUDE_DIRS ${Zstd_INCLUDE_DIR})
- set(Zstd_LIBRARIES ${Zstd_LIBRARY})
+if(ZSTD_FOUND)
+ set(ZSTD_INCLUDE_DIRS ${ZSTD_INCLUDE_DIR})
+ set(ZSTD_LIBRARIES ${ZSTD_LIBRARY})
endif()
-mark_as_advanced(Zstd_INCLUDE_DIR Zstd_LIBRARY)
+mark_as_advanced(ZSTD_INCLUDE_DIR ZSTD_LIBRARY)
find_package(WolfSSL REQUIRED)
set(_ssl_enabled ON)
set(USE_WOLFSSL ON)
- list(APPEND CURL_LIBS ${WolfSSL_LIBRARIES})
+ list(APPEND CURL_LIBS ${WOLFSSL_LIBRARIES})
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "wolfssl")
- include_directories(${WolfSSL_INCLUDE_DIRS})
+ include_directories(${WOLFSSL_INCLUDE_DIRS})
if(CURL_DEFAULT_SSL_BACKEND AND CURL_DEFAULT_SSL_BACKEND STREQUAL "wolfssl")
set(_valid_default_ssl_backend TRUE)
set(HAVE_ZSTD OFF)
if(CURL_ZSTD)
find_package(Zstd REQUIRED)
- if(Zstd_FOUND AND NOT Zstd_VERSION VERSION_LESS 1.0.0)
+ if(ZSTD_FOUND AND NOT ZSTD_VERSION VERSION_LESS 1.0.0)
set(HAVE_ZSTD ON)
- list(APPEND CURL_LIBS ${Zstd_LIBRARIES})
+ list(APPEND CURL_LIBS ${ZSTD_LIBRARIES})
list(APPEND LIBCURL_PC_REQUIRES_PRIVATE "libzstd")
- include_directories(${Zstd_INCLUDE_DIRS})
+ include_directories(${ZSTD_INCLUDE_DIRS})
else()
message(WARNING "zstd v1.0.0 or newer is required, disabling zstd support.")
endif()
list(APPEND CMAKE_REQUIRED_LIBRARIES "bcrypt") # for OpenSSL/LibreSSL
endif()
elseif(USE_WOLFSSL)
- set(CMAKE_REQUIRED_INCLUDES "${WolfSSL_INCLUDE_DIRS}")
- set(CMAKE_REQUIRED_LIBRARIES "${WolfSSL_LIBRARIES}")
+ set(CMAKE_REQUIRED_INCLUDES "${WOLFSSL_INCLUDE_DIRS}")
+ set(CMAKE_REQUIRED_LIBRARIES "${WOLFSSL_LIBRARIES}")
if(HAVE_LIBZ)
list(APPEND CMAKE_REQUIRED_INCLUDES "${ZLIB_INCLUDE_DIRS}") # Public wolfSSL headers require zlib headers
list(APPEND CMAKE_REQUIRED_LIBRARIES "${ZLIB_LIBRARIES}")