From ecd4d54391b908a55f7ac53fd0196972c96a04c9 Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Tue, 8 Nov 2022 09:28:52 +0100 Subject: [PATCH] extmod/extmod.cmake: Allow overriding the default MBEDTLS_CONFIG_FILE. --- extmod/extmod.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extmod/extmod.cmake b/extmod/extmod.cmake index 954bfc7e96..2207a951ad 100644 --- a/extmod/extmod.cmake +++ b/extmod/extmod.cmake @@ -187,8 +187,12 @@ if(MICROPY_SSL_MBEDTLS) ${MICROPY_LIB_MBEDTLS_DIR}/library/xtea.c ) + if(NOT MBEDTLS_CONFIG_FILE) + set(MBEDTLS_CONFIG_FILE "${MICROPY_PORT_DIR}/mbedtls/mbedtls_config.h") + endif() + target_compile_definitions(micropy_lib_mbedtls INTERFACE - MBEDTLS_CONFIG_FILE="${MICROPY_PORT_DIR}/mbedtls/mbedtls_config.h" + MBEDTLS_CONFIG_FILE="${MBEDTLS_CONFIG_FILE}" ) list(APPEND MICROPY_INC_CORE