Jamie Fox | 0e54ebc | 2019-04-09 14:21:04 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
| 2 | # Copyright (c) 2019, Arm Limited. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | |
| 8 | # Mbed Crypto can be built in the same way Mbed TLS is built |
| 9 | include(${TFM_ROOT_DIR}/BuildMbedtls.cmake) |
| 10 | |
| 11 | # After building the install target, rename the installed include/psa directory |
| 12 | # to include/mbedcrypto/psa to avoid name clash with the PSA Crypto headers in |
| 13 | # TF-M. |
| 14 | add_custom_command(TARGET ${MBEDTLS_TARGET_NAME}_install |
| 15 | POST_BUILD |
| 16 | COMMAND ${CMAKE_COMMAND} -E copy_directory |
| 17 | ${MBEDTLS_INSTALL_DIR}/include/psa |
| 18 | ${MBEDTLS_INSTALL_DIR}/include/mbedcrypto/psa |
| 19 | COMMAND ${CMAKE_COMMAND} -E remove_directory |
| 20 | ${MBEDTLS_INSTALL_DIR}/include/psa) |