| From 7f254bf14a97d14d19e61e2b8f8359bc238f3f1b Mon Sep 17 00:00:00 2001 |
| From: Anton Antonov <Anton.Antonov@arm.com> |
| Date: Wed, 31 Aug 2022 17:07:51 +0100 |
| Subject: [PATCH 3/4] Always define PSA_CRYPTO_API_INCLUDE |
| |
| PSA_CRYPTO_API_INCLUDE is not defined when pre-built mbedtls was used. |
| |
| Upstream-Status: Pending |
| Signed-off-by: Anton Antonov <Anton.Antonov@arm.com> |
| --- |
| external/MbedTLS/MbedTLS.cmake | 5 +++-- |
| 1 file changed, 3 insertions(+), 2 deletions(-) |
| |
| diff --git a/external/MbedTLS/MbedTLS.cmake b/external/MbedTLS/MbedTLS.cmake |
| index 3193a07..f15e25d 100644 |
| --- a/external/MbedTLS/MbedTLS.cmake |
| +++ b/external/MbedTLS/MbedTLS.cmake |
| @@ -96,8 +96,6 @@ if (NOT MBEDCRYPTO_LIB_FILE) |
| #Configure Mbed TLS to build only mbedcrypto lib |
| execute_process(COMMAND ${Python3_EXECUTABLE} scripts/config.py crypto WORKING_DIRECTORY ${MBEDTLS_SOURCE_DIR}) |
| |
| - # Advertise Mbed TLS as the provider of the psa crypto API |
| - set(PSA_CRYPTO_API_INCLUDE "${MBEDTLS_INSTALL_DIR}/include" CACHE STRING "PSA Crypto API include path") |
| |
| include(${TS_ROOT}/tools/cmake/common/PropertyCopy.cmake) |
| |
| @@ -157,6 +155,9 @@ if (NOT MBEDCRYPTO_LIB_FILE) |
| set(MBEDCRYPTO_LIB_FILE "${MBEDTLS_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}mbedcrypto${CMAKE_STATIC_LIBRARY_SUFFIX}") |
| endif() |
| |
| +# Advertise Mbed TLS as the provider of the psa crypto API |
| +set(PSA_CRYPTO_API_INCLUDE "${MBEDTLS_INSTALL_DIR}/include" CACHE STRING "PSA Crypto API include path") |
| + |
| #Create an imported target to have clean abstraction in the build-system. |
| add_library(mbedcrypto STATIC IMPORTED) |
| set_property(DIRECTORY ${CMAKE_SOURCE_DIR} APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${MBEDCRYPTO_LIB_FILE}) |
| -- |
| 2.25.1 |
| |