Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Gyorgy Szing | c31afbf | 2021-02-12 01:51:55 +0100 | [diff] [blame] | 2 | # Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved. |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 3 | # |
| 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 | #------------------------------------------------------------------------------- |
| 19 | include(${TS_ROOT}/deployments/libts/libts-import.cmake) |
| 20 | target_link_libraries(ts-service-test PRIVATE libts) |
| 21 | |
| 22 | #------------------------------------------------------------------------------- |
| 23 | # Components that are common accross all deployments |
| 24 | # |
| 25 | #------------------------------------------------------------------------------- |
| 26 | add_components( |
| 27 | TARGET "ts-service-test" |
| 28 | BASE_DIR ${TS_ROOT} |
| 29 | COMPONENTS |
julhal01 | 734dbad | 2020-12-21 10:27:41 +0000 | [diff] [blame] | 30 | "components/common/tlv" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 31 | "components/service/crypto/test/service" |
julhal01 | 734dbad | 2020-12-21 10:27:41 +0000 | [diff] [blame] | 32 | "components/service/crypto/test/service/protobuf" |
| 33 | "components/service/crypto/test/service/packed-c" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 34 | "components/service/crypto/client/cpp" |
julhal01 | 734dbad | 2020-12-21 10:27:41 +0000 | [diff] [blame] | 35 | "components/service/crypto/client/cpp/protobuf" |
| 36 | "components/service/crypto/client/cpp/packed-c" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 37 | "components/service/common/serializer/protobuf" |
| 38 | "protocols/service/crypto/protobuf" |
julhal01 | 734dbad | 2020-12-21 10:27:41 +0000 | [diff] [blame] | 39 | "protocols/service/crypto/packed-c" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 40 | ) |
| 41 | |
| 42 | #------------------------------------------------------------------------------- |
| 43 | # Components used from external projects |
| 44 | # |
| 45 | #------------------------------------------------------------------------------- |
| 46 | |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 47 | # Nanopb |
| 48 | include(${TS_ROOT}/external/nanopb/nanopb.cmake) |
| 49 | target_link_libraries(ts-service-test PRIVATE nanopb::protobuf-nanopb-static) |
| 50 | protobuf_generate_all(TGT "ts-service-test" NAMESPACE "protobuf" BASE_DIR "${TS_ROOT}/protocols") |
| 51 | |
| 52 | # Mbedcrypto |
| 53 | include(${TS_ROOT}/external/mbed-crypto/mbedcrypto.cmake) |
| 54 | target_link_libraries(ts-service-test PRIVATE mbedcrypto) |
| 55 | |
| 56 | #------------------------------------------------------------------------------- |
| 57 | # Define install content. |
| 58 | # |
| 59 | #------------------------------------------------------------------------------- |
| 60 | if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
| 61 | set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE) |
| 62 | endif() |
Gyorgy Szing | c31afbf | 2021-02-12 01:51:55 +0100 | [diff] [blame] | 63 | install(TARGETS ts-service-test RUNTIME DESTINATION ${TS_ENV}/bin) |