From 380799e0449142637d69ebf770d0f7c2ed9ca883 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 25 Feb 2024 13:23:35 -0800 Subject: build: Mbed TLS should use MBEDTLS_ROOT first. The old MBEDTLS_ROOT_DIR is still honored for legacy compat, but the version 4.3 find script won't use it by default. --- cmake/FindMbedTLS.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/FindMbedTLS.cmake b/cmake/FindMbedTLS.cmake index db065ca4..2d3f05e2 100644 --- a/cmake/FindMbedTLS.cmake +++ b/cmake/FindMbedTLS.cmake @@ -28,10 +28,13 @@ # # Hints: # -# Set ``MBEDTLS_ROOT_DIR`` to the root directory of Mbed TLS installation. +# Set ``MBEDTLS_ROOT`` to the root directory of Mbed TLS installation. # -set(_MBEDTLS_ROOT_HINTS ${MBEDTLS_ROOT_DIR} ENV MBEDTLS_ROOT_DIR) +set(_MBEDTLS_ROOT_HINTS ${MBEDTLS_ROOT} ENV MBEDTLS_ROOT) +if (NOT _MBEDTLS_ROOT_HINTS) + set(_MBEDTLS_ROOT_HINTS ${MBEDTLS_ROOT_DIR} ENV MBEDTLS_ROOT_DIR) +endif() set(_MBED_REQUIRED_VARS MbedTLS_TARGET MbedX509_TARGET MbedCrypto_TARGET MbedTLS_VERSION) -- cgit v1.2.3-70-g09d2