blob: a8952f4213a46ce389af9f656fa632fb787571eb [file] [log] [blame]
Julian Hall4834e632021-05-26 15:33:06 +01001#-------------------------------------------------------------------------------
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#-------------------------------------------------------------------------------
18include(${TS_ROOT}/deployments/libts/libts-import.cmake)
19target_link_libraries(platform-inspect PRIVATE libts)
20
21#-------------------------------------------------------------------------------
22# Components that are common accross all deployments
23#
24#-------------------------------------------------------------------------------
25add_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"
32 "components/service/common/include"
33 "components/service/attestation/include"
34 "components/service/attestation/client/psa"
35 "components/service/attestation/client/provision"
36 "components/service/attestation/reporter/dump/raw"
37 "components/service/attestation/reporter/dump/pretty"
38)
39
40#-------------------------------------------------------------------------------
41# Components used from external projects
42#
43#-------------------------------------------------------------------------------
44
45# Configuration for mbedcrypto
46set(MBEDTLS_USER_CONFIG_FILE
47 "${TS_ROOT}/components/service/crypto/client/cpp/config_mbedtls_user.h"
48 CACHE STRING "Configuration file for mbedcrypto")
49
50# Mbed TLS provides libmbedcrypto
51include(../../../external/MbedTLS/MbedTLS.cmake)
52target_link_libraries(platform-inspect PRIVATE mbedcrypto)
53
54# Qcbor
55include(${TS_ROOT}/external/qcbor/qcbor.cmake)
56target_link_libraries(platform-inspect PRIVATE qcbor)
57
58# t_cose
59include(${TS_ROOT}/external/t_cose/t_cose.cmake)
60target_link_libraries(platform-inspect PRIVATE t_cose)
61
62#-------------------------------------------------------------------------------
63# Define install content.
64#
65#-------------------------------------------------------------------------------
66if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
67 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
68endif()
69install(TARGETS platform-inspect RUNTIME DESTINATION ${TS_ENV}/bin)