Hi Mickael,
You should be able to use "../" in the path in MBEDTLS_CONFIG_FILE to put the config file in a directory other than the Mbed TLS directory.
Alternatively, we have added support for setting MBEDTLS_CONFIG_FILE via CMake[1]. This will be available in the next release, or you can get it from the development and mbedtls-2.28 branches.
When setting it via CMake, the build system takes care of converting a relative path in CMake to an absolute path which makes it more convenient.
[1] https://github.com/Mbed-TLS/mbedtls/pull/6914
I hope that helps,
David Horstmann Mbed TLS Developer
________________________________ From: mickael.bonjour--- via mbed-tls mbed-tls@lists.trustedfirmware.org Sent: 16 August 2023 15:39 To: mbed-tls@lists.trustedfirmware.org mbed-tls@lists.trustedfirmware.org Subject: [mbed-tls] Custom MBEDTLS_CONFIG_FILE with CMake subproject
Hello,
I need some help to setup mbedtls as a CMake subproject, I added it as a subdirectory in my CMakeLists. However, I can't figure out how to use my own config file for mbedtls (MBEDTLS_CONFIG_FILE option to the file I want as a config file).
When I put my custom config file to the include folder of mbedtls in the place of the original mbedtls_config.h file it works wel,l but it's not a future-proof option for me, is there anyone that could help me with this setup ? -- mbed-tls mailing list -- mbed-tls@lists.trustedfirmware.org To unsubscribe send an email to mbed-tls-leave@lists.trustedfirmware.org