blob: ef4ba4ba3d8942b1ff5cc0b98275c9743912e239 [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"
Julian Hall99a57e32021-07-28 14:18:50 +010032 "components/service/common/client"
Julian Hall4834e632021-05-26 15:33:06 +010033 "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
47set(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
52include(../../../external/MbedTLS/MbedTLS.cmake)
53target_link_libraries(platform-inspect PRIVATE mbedcrypto)
54
55# Qcbor
56include(${TS_ROOT}/external/qcbor/qcbor.cmake)
57target_link_libraries(platform-inspect PRIVATE qcbor)
58
59# t_cose
60include(${TS_ROOT}/external/t_cose/t_cose.cmake)
61target_link_libraries(platform-inspect PRIVATE t_cose)
62
63#-------------------------------------------------------------------------------
64# Define install content.
65#
66#-------------------------------------------------------------------------------
67if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
68 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
69endif()
70install(TARGETS platform-inspect RUNTIME DESTINATION ${TS_ENV}/bin)