From a9bcc81f821d7c66f623779fa5147e728eb3c388 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 03:24:41 +0200 Subject: Adding upstream version 3.3.0+dfsg1. Signed-off-by: Daniel Baumann --- cmake/FindMbedTLS.cmake | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 cmake/FindMbedTLS.cmake (limited to 'cmake/FindMbedTLS.cmake') diff --git a/cmake/FindMbedTLS.cmake b/cmake/FindMbedTLS.cmake new file mode 100644 index 0000000..ceb6cfb --- /dev/null +++ b/cmake/FindMbedTLS.cmake @@ -0,0 +1,38 @@ + +find_path(MBEDTLS_INCLUDE_DIR + NAMES mbedtls/ssl.h + PATH_SUFFIXES include + HINTS ${MBEDTLS_ROOT}) + +find_library(MBEDTLS_LIBRARY + NAMES mbedtls + PATH_SUFFIXES lib + HINTS ${MBEDTLS_ROOT}) + +find_library(MBEDCRYPTO_LIBRARY + NAMES mbedcrypto + PATH_SUFFIXES lib + HINTS ${MBEDTLS_ROOT}) + +find_library(MBEDX509_LIBRARY + NAMES mbedx509 + PATH_SUFFIXES lib + HINTS ${MBEDTLS_ROOT}) + +if(MBEDTLS_INCLUDE_DIR AND MBEDTLS_LIBRARY) + set(MBEDTLS_FOUND TRUE) + set(MBEDTLS_LIBRARIES ${MBEDTLS_LIBRARY} ${MBEDCRYPTO_LIBRARY} ${MBEDX509_LIBRARY}) +endif() + +if(MBEDTLS_FOUND) + if(NOT MBEDTLS_FIND_QUIETLY) + message(STATUS "Found mbed TLS: ${MBEDTLS_LIBRARIES}") + endif() +else() + if(MBEDTLS_FIND_REQUIRED) + message(FATAL_ERROR "mbed TLS was not found") + endif() +endif() + +mark_as_advanced(MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARY) + -- cgit v1.2.3