# BROTLI_INCLUDE_DIRS The brotli include directories
# BROTLI_LIBRARIES The brotli library names
-include(FindPackageHandleStandardArgs)
-
find_path(BROTLI_INCLUDE_DIR "brotli/decode.h")
find_library(BROTLICOMMON_LIBRARY NAMES "brotlicommon")
find_library(BROTLIDEC_LIBRARY NAMES "brotlidec")
+include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Brotli
FOUND_VAR
BROTLI_FOUND
find_path(CARES_INCLUDE_DIR "ares.h")
-find_library(CARES_LIBRARY
- NAMES ${CARES_NAMES} "cares"
-)
+find_library(CARES_LIBRARY NAMES ${CARES_NAMES} "cares")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CARES
#
# GSS_FOUND System has the Heimdal library
# GSS_FLAVOUR "MIT" or "Heimdal" if anything found
-# GSS_INCLUDE_DIR the Heimdal include directory
-# GSS_LIBRARIES The libraries needed to use GSS
+# GSS_INCLUDE_DIR The GSS include directory
+# GSS_LIBRARIES The GSS library names
# GSS_LINK_DIRECTORIES Directories to add to linker search path
# GSS_LINKER_FLAGS Additional linker flags
# GSS_COMPILER_FLAGS Additional compiler flags
else() # Either there is no config script or we are on a platform that does not provide one (Windows?)
- find_path(_GSS_INCLUDE_DIRS
- NAMES
- "gssapi/gssapi.h"
+ find_path(_GSS_INCLUDE_DIRS NAMES "gssapi/gssapi.h"
HINTS
${_gss_root_hints}
PATH_SUFFIXES
if(_GSS_INCLUDE_DIRS) # jay, we have found something
set(CMAKE_REQUIRED_INCLUDES "${_GSS_INCLUDE_DIRS}")
- check_include_files("gssapi/gssapi_generic.h;gssapi/gssapi_krb5.h" _GSS_HAVE_MIT_HEADERS)
+ check_include_files("gssapi/gssapi_generic.h;gssapi/gssapi_krb5.h" _gss_have_mit_headers)
- if(_GSS_HAVE_MIT_HEADERS)
+ if(_gss_have_mit_headers)
set(GSS_FLAVOUR "MIT")
else()
# Prevent compiling the header - just check if we can include it
list(APPEND CMAKE_REQUIRED_DEFINITIONS "-D__ROKEN_H__")
- check_include_file("roken.h" _GSS_HAVE_ROKEN_H)
+ check_include_file("roken.h" _gss_have_roken_h)
- check_include_file("heimdal/roken.h" _GSS_HAVE_HEIMDAL_ROKEN_H)
- if(_GSS_HAVE_ROKEN_H OR _GSS_HAVE_HEIMDAL_ROKEN_H)
+ check_include_file("heimdal/roken.h" _gss_have_heimdal_roken_h)
+ if(_gss_have_roken_h OR _gss_have_heimdal_roken_h)
set(GSS_FLAVOUR "Heimdal")
endif()
list(REMOVE_ITEM CMAKE_REQUIRED_DEFINITIONS "-D__ROKEN_H__")
endif()
else()
# I am not convinced if this is the right way but this is what autotools do at the moment
- find_path(_GSS_INCLUDE_DIRS
- NAMES
- "gssapi.h"
+ find_path(_GSS_INCLUDE_DIRS NAMES "gssapi.h"
HINTS
${_gss_root_hints}
PATH_SUFFIXES
endif()
endif()
- find_library(_GSS_LIBRARIES
- NAMES
- ${_gss_libname}
+ find_library(_GSS_LIBRARIES NAMES ${_gss_libname}
HINTS
${_gss_libdir_hints}
PATH_SUFFIXES
endif()
include(FindPackageHandleStandardArgs)
-
find_package_handle_standard_args(GSS
REQUIRED_VARS
GSS_LIBRARIES GSS_FLAVOUR
if(LIBPSL_INCLUDE_DIR)
file(STRINGS "${LIBPSL_INCLUDE_DIR}/libpsl.h" _libpsl_version_str REGEX "^#define[\t ]+PSL_VERSION[\t ]+\"(.*)\"")
- string(REGEX REPLACE "^.*\"([^\"]+)\"" "\\1" LIBPSL_VERSION "${_libpsl_version_str}")
+ string(REGEX REPLACE "^.*\"([^\"]+)\"" "\\1" LIBPSL_VERSION "${_libpsl_version_str}")
endif()
include(FindPackageHandleStandardArgs)
if(LIBSSH2_INCLUDE_DIR)
file(STRINGS "${LIBSSH2_INCLUDE_DIR}/libssh2.h" _libssh2_version_str REGEX "^#define[\t ]+LIBSSH2_VERSION[\t ]+\"(.*)\"")
- string(REGEX REPLACE "^.*\"([^\"]+)\"" "\\1" LIBSSH2_VERSION "${_libssh2_version_str}")
+ string(REGEX REPLACE "^.*\"([^\"]+)\"" "\\1" LIBSSH2_VERSION "${_libssh2_version_str}")
endif()
include(FindPackageHandleStandardArgs)
#
# MSH3_FOUND System has msh3
# MSH3_INCLUDE_DIRS The msh3 include directories
-# MSH3_LIBRARIES The libraries needed to use msh3
+# MSH3_LIBRARIES The msh3 library names
if(CURL_USE_PKGCONFIG)
find_package(PkgConfig QUIET)
#
# MBEDTLS_FOUND System has mbedtls
# MBEDTLS_INCLUDE_DIRS The mbedtls include directories
-# MBEDTLS_LIBRARIES The libraries needed to use mbedtls
+# MBEDTLS_LIBRARIES The mbedtls library names
find_path(MBEDTLS_INCLUDE_DIRS "mbedtls/ssl.h")
#
# NGHTTP2_FOUND System has nghttp2
# NGHTTP2_INCLUDE_DIRS The nghttp2 include directories
-# NGHTTP2_LIBRARIES The libraries needed to use nghttp2
+# NGHTTP2_LIBRARIES The nghttp2 library names
# NGHTTP2_VERSION Version of nghttp2
if(CURL_USE_PKGCONFIG)
#
# NGHTTP3_FOUND System has nghttp3
# NGHTTP3_INCLUDE_DIRS The nghttp3 include directories
-# NGHTTP3_LIBRARIES The libraries needed to use nghttp3
+# NGHTTP3_LIBRARIES The nghttp3 library names
# NGHTTP3_VERSION Version of nghttp3
if(CURL_USE_PKGCONFIG)
#
# NGTCP2_FOUND System has ngtcp2
# NGTCP2_INCLUDE_DIRS The ngtcp2 include directories
-# NGTCP2_LIBRARIES The libraries needed to use ngtcp2
+# NGTCP2_LIBRARIES The ngtcp2 library names
# NGTCP2_VERSION Version of ngtcp2
if(CURL_USE_PKGCONFIG)
if(CURL_USE_PKGCONFIG)
pkg_search_module(PC_${_crypto_library} "lib${_crypto_library}")
endif()
- find_library(${_crypto_library}_LIBRARY
- NAMES
- ${_crypto_library}
+ find_library(${_crypto_library}_LIBRARY NAMES ${_crypto_library}
HINTS
${PC_${_crypto_library}_LIBDIR}
${PC_${_crypto_library}_LIBRARY_DIRS}
if(EXISTS "${NETTLE_INCLUDE_DIR}/nettle/version.h")
set(_version_regex_major "^#define[ \t]+NETTLE_VERSION_MAJOR[ \t]+([0-9]+).*")
set(_version_regex_minor "^#define[ \t]+NETTLE_VERSION_MINOR[ \t]+([0-9]+).*")
- file(STRINGS "${NETTLE_INCLUDE_DIR}/nettle/version.h"
- _version_major REGEX "${_version_regex_major}")
- file(STRINGS "${NETTLE_INCLUDE_DIR}/nettle/version.h"
- _version_minor REGEX "${_version_regex_minor}")
+ file(STRINGS "${NETTLE_INCLUDE_DIR}/nettle/version.h" _version_major REGEX "${_version_regex_major}")
+ file(STRINGS "${NETTLE_INCLUDE_DIR}/nettle/version.h" _version_minor REGEX "${_version_regex_minor}")
string(REGEX REPLACE "${_version_regex_major}" "\\1" _version_major "${_version_major}")
string(REGEX REPLACE "${_version_regex_minor}" "\\1" _version_minor "${_version_minor}")
unset(_version_regex_major)
#
# QUICHE_FOUND System has quiche
# QUICHE_INCLUDE_DIRS The quiche include directories
-# QUICHE_LIBRARIES The libraries needed to use quiche
+# QUICHE_LIBRARIES The quiche library names
if(CURL_USE_PKGCONFIG)
find_package(PkgConfig QUIET)
pkg_search_module(PC_WOLFSSL QUIET "wolfssl")
endif()
-find_path(WolfSSL_INCLUDE_DIR
- NAMES "wolfssl/ssl.h"
- HINTS ${PC_WOLFSSL_INCLUDE_DIRS}
+find_path(WolfSSL_INCLUDE_DIR NAMES "wolfssl/ssl.h"
+ HINTS
+ ${PC_WOLFSSL_INCLUDE_DIRS}
)
-find_library(WolfSSL_LIBRARY
- NAMES "wolfssl"
- HINTS ${PC_WOLFSSL_LIBRARY_DIRS}
+find_library(WolfSSL_LIBRARY NAMES "wolfssl"
+ HINTS
+ ${PC_WOLFSSL_LIBRARY_DIRS}
)
if(WolfSSL_INCLUDE_DIR)
set(_version_regex "^#define[ \t]+LIBWOLFSSL_VERSION_STRING[ \t]+\"([^\"]+)\".*")
- file(STRINGS "${WolfSSL_INCLUDE_DIR}/wolfssl/version.h"
- WolfSSL_VERSION REGEX "${_version_regex}")
- string(REGEX REPLACE "${_version_regex}" "\\1"
- WolfSSL_VERSION "${WolfSSL_VERSION}")
+ file(STRINGS "${WolfSSL_INCLUDE_DIR}/wolfssl/version.h" WolfSSL_VERSION REGEX "${_version_regex}")
+ string(REGEX REPLACE "${_version_regex}" "\\1" WolfSSL_VERSION "${WolfSSL_VERSION}")
unset(_version_regex)
endif()
#
# Zstd_FOUND System has zstd
# Zstd_INCLUDE_DIRS The zstd include directories
-# Zstd_LIBRARIES The libraries needed to use zstd
+# Zstd_LIBRARIES The zstd library names
# Zstd_VERSION Version of zstd
if(CURL_USE_PKGCONFIG)