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-demo' for |
| 10 | # different environments. Demonstrates use of trusted services by a |
| 11 | # client application. |
| 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-demo PRIVATE libts) |
| 21 | |
| 22 | #------------------------------------------------------------------------------- |
| 23 | # Common main for all deployments |
| 24 | # |
| 25 | #------------------------------------------------------------------------------- |
| 26 | target_sources(ts-demo PRIVATE |
| 27 | "${CMAKE_CURRENT_LIST_DIR}/ts-demo.cpp" |
| 28 | ) |
| 29 | |
| 30 | #------------------------------------------------------------------------------- |
| 31 | # Components that are common accross all deployments |
| 32 | # |
| 33 | #------------------------------------------------------------------------------- |
| 34 | add_components( |
| 35 | TARGET "ts-demo" |
| 36 | BASE_DIR ${TS_ROOT} |
| 37 | COMPONENTS |
| 38 | "components/app/ts-demo" |
julhal01 | 734dbad | 2020-12-21 10:27:41 +0000 | [diff] [blame^] | 39 | "components/common/tlv" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 40 | "components/service/crypto/client/cpp" |
julhal01 | 734dbad | 2020-12-21 10:27:41 +0000 | [diff] [blame^] | 41 | "components/service/crypto/client/cpp/packed-c" |
| 42 | "protocols/service/crypto/packed-c" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 43 | ) |
| 44 | |
| 45 | #------------------------------------------------------------------------------- |
| 46 | # Components used from external projects |
| 47 | # |
| 48 | #------------------------------------------------------------------------------- |
| 49 | |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 50 | # Mbedcrypto |
| 51 | include(${TS_ROOT}/external/mbed-crypto/mbedcrypto.cmake) |
| 52 | target_link_libraries(ts-demo PRIVATE mbedcrypto) |
| 53 | |
| 54 | #------------------------------------------------------------------------------- |
| 55 | # Define install content. |
| 56 | # |
| 57 | #------------------------------------------------------------------------------- |
| 58 | if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
| 59 | set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE) |
| 60 | endif() |
Gyorgy Szing | c31afbf | 2021-02-12 01:51:55 +0100 | [diff] [blame] | 61 | install(TARGETS ts-demo RUNTIME DESTINATION ${TS_ENV}/bin) |