Julian Hall | 4834e63 | 2021-05-26 15:33:06 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
| 2 | # Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | |
| 8 | #------------------------------------------------------------------------------- |
| 9 | # The base build file shared between deployments of 'platform-inspect' for |
| 10 | # different environments. |
| 11 | #------------------------------------------------------------------------------- |
| 12 | |
| 13 | #------------------------------------------------------------------------------- |
| 14 | # Use libts for locating and accessing trusted services. An appropriate version |
| 15 | # of libts will be imported for the enviroment in which platform-inspect is |
| 16 | # built. |
| 17 | #------------------------------------------------------------------------------- |
| 18 | include(${TS_ROOT}/deployments/libts/libts-import.cmake) |
| 19 | target_link_libraries(platform-inspect PRIVATE libts) |
| 20 | |
| 21 | #------------------------------------------------------------------------------- |
| 22 | # Components that are common accross all deployments |
| 23 | # |
| 24 | #------------------------------------------------------------------------------- |
| 25 | add_components( |
| 26 | TARGET "platform-inspect" |
| 27 | BASE_DIR ${TS_ROOT} |
| 28 | COMPONENTS |
| 29 | "components/app/platform-inspect" |
| 30 | "components/common/tlv" |
| 31 | "components/common/cbor_dump" |
Julian Hall | 99a57e3 | 2021-07-28 14:18:50 +0100 | [diff] [blame] | 32 | "components/service/common/client" |
Julian Hall | 4834e63 | 2021-05-26 15:33:06 +0100 | [diff] [blame] | 33 | "components/service/common/include" |
| 34 | "components/service/attestation/include" |
| 35 | "components/service/attestation/client/psa" |
| 36 | "components/service/attestation/client/provision" |
| 37 | "components/service/attestation/reporter/dump/raw" |
| 38 | "components/service/attestation/reporter/dump/pretty" |
| 39 | ) |
| 40 | |
| 41 | #------------------------------------------------------------------------------- |
| 42 | # Components used from external projects |
| 43 | # |
| 44 | #------------------------------------------------------------------------------- |
| 45 | |
| 46 | # Configuration for mbedcrypto |
| 47 | set(MBEDTLS_USER_CONFIG_FILE |
| 48 | "${TS_ROOT}/components/service/crypto/client/cpp/config_mbedtls_user.h" |
| 49 | CACHE STRING "Configuration file for mbedcrypto") |
| 50 | |
| 51 | # Mbed TLS provides libmbedcrypto |
| 52 | include(../../../external/MbedTLS/MbedTLS.cmake) |
| 53 | target_link_libraries(platform-inspect PRIVATE mbedcrypto) |
| 54 | |
| 55 | # Qcbor |
| 56 | include(${TS_ROOT}/external/qcbor/qcbor.cmake) |
| 57 | target_link_libraries(platform-inspect PRIVATE qcbor) |
| 58 | |
| 59 | # t_cose |
| 60 | include(${TS_ROOT}/external/t_cose/t_cose.cmake) |
| 61 | target_link_libraries(platform-inspect PRIVATE t_cose) |
| 62 | |
| 63 | #------------------------------------------------------------------------------- |
| 64 | # Define install content. |
| 65 | # |
| 66 | #------------------------------------------------------------------------------- |
| 67 | if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
| 68 | set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE) |
| 69 | endif() |
| 70 | install(TARGETS platform-inspect RUNTIME DESTINATION ${TS_ENV}/bin) |