Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Balint Dobszay | ff8e0cd | 2022-08-11 15:07:52 +0200 | [diff] [blame] | 2 | # Copyright (c) 2020-2023, 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 | #------------------------------------------------------------------------------- |
Gabor Toth | 70cb3c6 | 2023-05-10 12:40:24 +0200 | [diff] [blame^] | 15 | # Use libpsa for locating PSA services. An appropriate version of |
| 16 | # libpsa will be imported for the environment. |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 17 | #------------------------------------------------------------------------------- |
Gabor Toth | 70cb3c6 | 2023-05-10 12:40:24 +0200 | [diff] [blame^] | 18 | include(${TS_ROOT}/deployments/libpsa/libpsa-import.cmake) |
| 19 | target_link_libraries(ts-demo PRIVATE libpsa::psa) |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 20 | |
| 21 | #------------------------------------------------------------------------------- |
| 22 | # Common main for all deployments |
| 23 | # |
| 24 | #------------------------------------------------------------------------------- |
| 25 | target_sources(ts-demo PRIVATE |
Gabor Toth | 70cb3c6 | 2023-05-10 12:40:24 +0200 | [diff] [blame^] | 26 | "${CMAKE_CURRENT_LIST_DIR}/ts-demo.c" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 27 | ) |
| 28 | |
| 29 | #------------------------------------------------------------------------------- |
Gyorgy Szing | ec62ea7 | 2022-07-20 12:36:52 +0000 | [diff] [blame] | 30 | # Components that are common across all deployments |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 31 | # |
| 32 | #------------------------------------------------------------------------------- |
| 33 | add_components( |
| 34 | TARGET "ts-demo" |
| 35 | BASE_DIR ${TS_ROOT} |
| 36 | COMPONENTS |
| 37 | "components/app/ts-demo" |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 38 | ) |
| 39 | |
| 40 | #------------------------------------------------------------------------------- |
Julian Hall | eff4b28 | 2020-11-23 18:24:12 +0100 | [diff] [blame] | 41 | # Define install content. |
| 42 | # |
| 43 | #------------------------------------------------------------------------------- |
| 44 | if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
| 45 | set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE) |
| 46 | endif() |
Gyorgy Szing | c31afbf | 2021-02-12 01:51:55 +0100 | [diff] [blame] | 47 | install(TARGETS ts-demo RUNTIME DESTINATION ${TS_ENV}/bin) |