blob: 4bd8c717eb81f130d03cae8f4889475d177c69c3 [file] [log] [blame]
Julian Halleff4b282020-11-23 18:24:12 +01001#-------------------------------------------------------------------------------
Gyorgy Szingc31afbf2021-02-12 01:51:55 +01002# Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
Julian Halleff4b282020-11-23 18:24:12 +01003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7
8#-------------------------------------------------------------------------------
9# The base build file shared between deployments of 'ts-service-test' for
10# different environments. Used for running end-to-end service-level tests
11# where test cases excerise trusted service client interfaces.
12#-------------------------------------------------------------------------------
13
14#-------------------------------------------------------------------------------
15# Use libts for locating and accessing services. An appropriate version of
16# libts will be imported for the enviroment in which service tests are
17# deployed.
18#-------------------------------------------------------------------------------
19include(${TS_ROOT}/deployments/libts/libts-import.cmake)
20target_link_libraries(ts-service-test PRIVATE libts)
21
22#-------------------------------------------------------------------------------
23# Components that are common accross all deployments
24#
25#-------------------------------------------------------------------------------
26add_components(
27 TARGET "ts-service-test"
28 BASE_DIR ${TS_ROOT}
29 COMPONENTS
julhal01734dbad2020-12-21 10:27:41 +000030 "components/common/tlv"
Julian Halleff4b282020-11-23 18:24:12 +010031 "components/service/crypto/test/service"
julhal01734dbad2020-12-21 10:27:41 +000032 "components/service/crypto/test/service/protobuf"
33 "components/service/crypto/test/service/packed-c"
Julian Halleff4b282020-11-23 18:24:12 +010034 "components/service/crypto/client/cpp"
julhal01734dbad2020-12-21 10:27:41 +000035 "components/service/crypto/client/cpp/protobuf"
36 "components/service/crypto/client/cpp/packed-c"
Julian Halleff4b282020-11-23 18:24:12 +010037 "components/service/common/serializer/protobuf"
38 "protocols/service/crypto/protobuf"
julhal01734dbad2020-12-21 10:27:41 +000039 "protocols/service/crypto/packed-c"
Julian Halleff4b282020-11-23 18:24:12 +010040)
41
42#-------------------------------------------------------------------------------
43# Components used from external projects
44#
45#-------------------------------------------------------------------------------
46
Julian Halleff4b282020-11-23 18:24:12 +010047# Nanopb
48include(${TS_ROOT}/external/nanopb/nanopb.cmake)
49target_link_libraries(ts-service-test PRIVATE nanopb::protobuf-nanopb-static)
50protobuf_generate_all(TGT "ts-service-test" NAMESPACE "protobuf" BASE_DIR "${TS_ROOT}/protocols")
51
52# Mbedcrypto
53include(${TS_ROOT}/external/mbed-crypto/mbedcrypto.cmake)
54target_link_libraries(ts-service-test PRIVATE mbedcrypto)
55
56#-------------------------------------------------------------------------------
57# Define install content.
58#
59#-------------------------------------------------------------------------------
60if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
61 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
62endif()
Gyorgy Szingc31afbf2021-02-12 01:51:55 +010063install(TARGETS ts-service-test RUNTIME DESTINATION ${TS_ENV}/bin)