blob: 77d441a2b914ff9e48c4762ade8dba19e6c03745 [file] [log] [blame]
Julian Hall4834e632021-05-26 15:33:06 +01001#-------------------------------------------------------------------------------
Balint Dobszayff8e0cd2022-08-11 15:07:52 +02002# Copyright (c) 2021-2023, 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)
Balint Dobszayff8e0cd2022-08-11 15:07:52 +020053target_link_libraries(platform-inspect PRIVATE MbedTLS::mbedcrypto)
Julian Hall4834e632021-05-26 15:33:06 +010054
55# Qcbor
56include(${TS_ROOT}/external/qcbor/qcbor.cmake)
Julian Hall4834e632021-05-26 15:33:06 +010057
58# t_cose
59include(${TS_ROOT}/external/t_cose/t_cose.cmake)
Gyorgy Szing52a832a2022-10-19 15:12:44 +020060# Ensure correct order of libraries on the command line of LD. t_cose depends on qcbor thus
61# qcbor must come later.
62target_link_libraries(platform-inspect PRIVATE t_cose qcbor)
Julian Hall4834e632021-05-26 15:33:06 +010063
64#-------------------------------------------------------------------------------
65# Define install content.
66#
67#-------------------------------------------------------------------------------
68if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
69 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
70endif()
71install(TARGETS platform-inspect RUNTIME DESTINATION ${TS_ENV}/bin)