extmod/extmod.cmake: Allow overriding the default MBEDTLS_CONFIG_FILE.

This commit is contained in:
iabdalkader 2022-11-08 09:28:52 +01:00 committed by Damien George
parent ebb1a4ecb0
commit ecd4d54391
1 changed files with 5 additions and 1 deletions

View File

@ -187,8 +187,12 @@ if(MICROPY_SSL_MBEDTLS)
${MICROPY_LIB_MBEDTLS_DIR}/library/xtea.c ${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 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 list(APPEND MICROPY_INC_CORE