blob: 5630a99407b96a5278f65ae38716b49abbb3fcbb [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
Julian Halleff4b282020-11-23 18:24:12 +010030 "components/service/crypto/test/service"
31 "components/service/crypto/client/cpp"
32 "components/service/common/serializer/protobuf"
33 "protocols/service/crypto/protobuf"
34)
35
36#-------------------------------------------------------------------------------
37# Components used from external projects
38#
39#-------------------------------------------------------------------------------
40
Julian Halleff4b282020-11-23 18:24:12 +010041# Nanopb
42include(${TS_ROOT}/external/nanopb/nanopb.cmake)
43target_link_libraries(ts-service-test PRIVATE nanopb::protobuf-nanopb-static)
44protobuf_generate_all(TGT "ts-service-test" NAMESPACE "protobuf" BASE_DIR "${TS_ROOT}/protocols")
45
46# Mbedcrypto
47include(${TS_ROOT}/external/mbed-crypto/mbedcrypto.cmake)
48target_link_libraries(ts-service-test PRIVATE mbedcrypto)
49
50#-------------------------------------------------------------------------------
51# Define install content.
52#
53#-------------------------------------------------------------------------------
54if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
55 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
56endif()
Gyorgy Szingc31afbf2021-02-12 01:51:55 +010057install(TARGETS ts-service-test RUNTIME DESTINATION ${TS_ENV}/bin)