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" |
julhal01 | 3a4207d | 2021-03-08 13:32:08 +0000 | [diff] [blame^] | 31 | "components/service/common" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 32 | "components/service/crypto/test/service" |
julhal01 | 734dbad | 2020-12-21 10:27:41 +0000 | [diff] [blame] | 33 | "components/service/crypto/test/service/protobuf" |
| 34 | "components/service/crypto/test/service/packed-c" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 35 | "components/service/crypto/client/cpp" |
julhal01 | 734dbad | 2020-12-21 10:27:41 +0000 | [diff] [blame] | 36 | "components/service/crypto/client/cpp/protobuf" |
| 37 | "components/service/crypto/client/cpp/packed-c" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 38 | "components/service/common/serializer/protobuf" |
| 39 | "protocols/service/crypto/protobuf" |
julhal01 | 734dbad | 2020-12-21 10:27:41 +0000 | [diff] [blame] | 40 | "protocols/service/crypto/packed-c" |
julhal01 | 3a4207d | 2021-03-08 13:32:08 +0000 | [diff] [blame^] | 41 | "components/service/secure_storage/test/service" |
| 42 | "components/service/secure_storage/frontend/psa/its" |
| 43 | "components/service/secure_storage/frontend/psa/its/test" |
| 44 | "components/service/secure_storage/frontend/psa/ps" |
| 45 | "components/service/secure_storage/frontend/psa/ps/test" |
| 46 | "components/service/secure_storage/backend/secure_storage_client" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 47 | ) |
| 48 | |
| 49 | #------------------------------------------------------------------------------- |
| 50 | # Components used from external projects |
| 51 | # |
| 52 | #------------------------------------------------------------------------------- |
| 53 | |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 54 | # Nanopb |
| 55 | include(${TS_ROOT}/external/nanopb/nanopb.cmake) |
| 56 | target_link_libraries(ts-service-test PRIVATE nanopb::protobuf-nanopb-static) |
| 57 | protobuf_generate_all(TGT "ts-service-test" NAMESPACE "protobuf" BASE_DIR "${TS_ROOT}/protocols") |
| 58 | |
| 59 | # Mbedcrypto |
| 60 | include(${TS_ROOT}/external/mbed-crypto/mbedcrypto.cmake) |
| 61 | target_link_libraries(ts-service-test PRIVATE mbedcrypto) |
| 62 | |
| 63 | #------------------------------------------------------------------------------- |
| 64 | # Define install content. |
| 65 | # |
| 66 | #------------------------------------------------------------------------------- |
| 67 | if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
| 68 | set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE) |
| 69 | endif() |
Gyorgy Szing | c31afbf | 2021-02-12 01:51:55 +0100 | [diff] [blame] | 70 | install(TARGETS ts-service-test RUNTIME DESTINATION ${TS_ENV}/bin) |