blob: b663fb6d51ad03bed241696b6a18c0d9b8429703 [file] [log] [blame]
Julian Halleff4b282020-11-23 18:24:12 +01001#-------------------------------------------------------------------------------
Balint Dobszayff8e0cd2022-08-11 15:07:52 +02002# Copyright (c) 2020-2023, Arm Limited and Contributors. All rights reserved.
Julian Halleff4b282020-11-23 18:24:12 +01003#
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 Tothee2e7cb2024-10-07 17:02:56 +020015# Use libpsats for locating PSA services. An appropriate version of
16# libpsats will be imported for the environment.
Julian Halleff4b282020-11-23 18:24:12 +010017#-------------------------------------------------------------------------------
Gabor Toth76909ad2024-09-25 15:23:21 +020018if (COVERAGE)
Gabor Tothee2e7cb2024-10-07 17:02:56 +020019 set(LIBPSATS_BUILD_TYPE "DEBUGCOVERAGE" CACHE STRING "Libpsats build type" FORCE)
Gabor Toth76909ad2024-09-25 15:23:21 +020020 set(LIBTS_BUILD_TYPE "DEBUGCOVERAGE" CACHE STRING "Libts build type" FORCE)
21endif()
22
Gabor Tothee2e7cb2024-10-07 17:02:56 +020023include(${TS_ROOT}/deployments/libpsats/libpsats-import.cmake)
24target_link_libraries(ts-demo PRIVATE libpsats::psats)
Julian Halleff4b282020-11-23 18:24:12 +010025
26#-------------------------------------------------------------------------------
27# Common main for all deployments
28#
29#-------------------------------------------------------------------------------
30target_sources(ts-demo PRIVATE
Gabor Toth70cb3c62023-05-10 12:40:24 +020031 "${CMAKE_CURRENT_LIST_DIR}/ts-demo.c"
Julian Halleff4b282020-11-23 18:24:12 +010032)
33
34#-------------------------------------------------------------------------------
Gyorgy Szingec62ea72022-07-20 12:36:52 +000035# Components that are common across all deployments
Julian Halleff4b282020-11-23 18:24:12 +010036#
37#-------------------------------------------------------------------------------
38add_components(
39 TARGET "ts-demo"
40 BASE_DIR ${TS_ROOT}
41 COMPONENTS
42 "components/app/ts-demo"
Julian Halleff4b282020-11-23 18:24:12 +010043)
44
45#-------------------------------------------------------------------------------
Julian Halleff4b282020-11-23 18:24:12 +010046# Define install content.
47#
48#-------------------------------------------------------------------------------
49if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
50 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
51endif()
Gyorgy Szingc31afbf2021-02-12 01:51:55 +010052install(TARGETS ts-demo RUNTIME DESTINATION ${TS_ENV}/bin)