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 'component-test' for |
| 10 | # different environments. Used for running standalone component tests |
| 11 | # contained within a single executable. |
| 12 | #------------------------------------------------------------------------------- |
| 13 | add_components( |
| 14 | TARGET "component-test" |
| 15 | BASE_DIR ${TS_ROOT} |
| 16 | COMPONENTS |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 17 | "components/app/ts-demo" |
| 18 | "components/app/ts-demo/test" |
| 19 | "components/common/uuid" |
| 20 | "components/common/uuid/test" |
julhal01 | 734dbad | 2020-12-21 10:27:41 +0000 | [diff] [blame^] | 21 | "components/common/tlv" |
| 22 | "components/common/tlv/test" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 23 | "components/rpc/common/caller" |
| 24 | "components/rpc/common/interface" |
julhal01 | 734dbad | 2020-12-21 10:27:41 +0000 | [diff] [blame^] | 25 | "components/rpc/common/test/protocol" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 26 | "components/rpc/direct" |
| 27 | "components/rpc/dummy" |
| 28 | "components/service/common" |
| 29 | "components/service/common/serializer/protobuf" |
| 30 | "components/service/common/provider" |
| 31 | "components/service/common/provider/test" |
| 32 | "components/service/locator" |
| 33 | "components/service/locator/interface" |
| 34 | "components/service/locator/test" |
| 35 | "components/service/locator/standalone" |
| 36 | "components/service/locator/standalone/services/crypto" |
| 37 | "components/service/crypto/client/cpp" |
julhal01 | 734dbad | 2020-12-21 10:27:41 +0000 | [diff] [blame^] | 38 | "components/service/crypto/client/cpp/protobuf" |
| 39 | "components/service/crypto/client/cpp/packed-c" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 40 | "components/service/crypto/client/test" |
| 41 | "components/service/crypto/client/test/standalone" |
| 42 | "components/service/crypto/provider/mbedcrypto" |
| 43 | "components/service/crypto/provider/mbedcrypto/entropy_source/mock" |
| 44 | "components/service/crypto/provider/serializer/protobuf" |
julhal01 | 734dbad | 2020-12-21 10:27:41 +0000 | [diff] [blame^] | 45 | "components/service/crypto/provider/serializer/packed-c" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 46 | "components/service/crypto/test/unit" |
| 47 | "components/service/crypto/test/service" |
julhal01 | 734dbad | 2020-12-21 10:27:41 +0000 | [diff] [blame^] | 48 | "components/service/crypto/test/service/protobuf" |
| 49 | "components/service/crypto/test/service/packed-c" |
| 50 | "components/service/crypto/test/protocol" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 51 | "components/service/secure_storage/client/psa" |
| 52 | "components/service/secure_storage/provider/mock_store" |
| 53 | "components/service/secure_storage/provider/secure_flash_store" |
| 54 | "components/service/secure_storage/provider/secure_flash_store/flash_fs" |
| 55 | "components/service/secure_storage/provider/secure_flash_store/flash" |
| 56 | "components/service/secure_storage/test" |
| 57 | "protocols/rpc/common/protobuf" |
| 58 | "protocols/rpc/common/packed-c" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 59 | "protocols/service/crypto/packed-c" |
| 60 | "protocols/service/crypto/protobuf" |
| 61 | "protocols/service/secure_storage/packed-c" |
| 62 | ) |
| 63 | |
| 64 | #------------------------------------------------------------------------------- |
| 65 | # Components used from external projects |
| 66 | # |
| 67 | #------------------------------------------------------------------------------- |
| 68 | |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 69 | # Nanopb |
| 70 | include(${TS_ROOT}/external/nanopb/nanopb.cmake) |
| 71 | target_link_libraries(component-test PRIVATE nanopb::protobuf-nanopb-static) |
| 72 | protobuf_generate_all(TGT "component-test" NAMESPACE "protobuf" BASE_DIR "${TS_ROOT}/protocols") |
| 73 | |
| 74 | # Mbedcrypto |
| 75 | include(${TS_ROOT}/external/mbed-crypto/mbedcrypto.cmake) |
| 76 | target_link_libraries(component-test PRIVATE mbedcrypto) |
| 77 | |
| 78 | #------------------------------------------------------------------------------- |
| 79 | # Define install content. |
| 80 | # |
| 81 | #------------------------------------------------------------------------------- |
| 82 | if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
| 83 | set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE) |
| 84 | endif() |
Gyorgy Szing | c31afbf | 2021-02-12 01:51:55 +0100 | [diff] [blame] | 85 | install(TARGETS component-test DESTINATION ${TS_ENV}/bin) |