blob: 4ee83fdfd55d3897ab7f3899cadeccde2f44b313 [file] [log] [blame]
Jamie Fox0e54ebc2019-04-09 14:21:04 +01001#-------------------------------------------------------------------------------
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
9include(${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.
14add_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)