blob: b1b316d810299ff70242c124f002fa4a4c29e484 [file] [log] [blame]
Julian Hall4834e632021-05-26 15:33:06 +01001#-------------------------------------------------------------------------------
Gyorgy Szingec62ea72022-07-20 12:36:52 +00002# Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved.
Julian Hall4834e632021-05-26 15:33:06 +01003#
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
Gyorgy Szingec62ea72022-07-20 12:36:52 +000015# of libts will be imported for the environment in which platform-inspect is
Julian Hall4834e632021-05-26 15:33:06 +010016# built.
17#-------------------------------------------------------------------------------
18include(${TS_ROOT}/deployments/libts/libts-import.cmake)
Gyorgy Szingec62ea72022-07-20 12:36:52 +000019target_link_libraries(platform-inspect PRIVATE libts::ts)
Julian Hall4834e632021-05-26 15:33:06 +010020
21#-------------------------------------------------------------------------------
Gyorgy Szingec62ea72022-07-20 12:36:52 +000022# Components that are common across all deployments
Julian Hall4834e632021-05-26 15:33:06 +010023#
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)