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