blob: a7fda2cdbc798bb0aee65c4cccf1fc88e4ada886 [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 Toth70cb3c62023-05-10 12:40:24 +020015# Use libpsa for locating PSA services. An appropriate version of
16# libpsa will be imported for the environment.
Julian Halleff4b282020-11-23 18:24:12 +010017#-------------------------------------------------------------------------------
Gabor Toth70cb3c62023-05-10 12:40:24 +020018include(${TS_ROOT}/deployments/libpsa/libpsa-import.cmake)
19target_link_libraries(ts-demo PRIVATE libpsa::psa)
Julian Halleff4b282020-11-23 18:24:12 +010020
21#-------------------------------------------------------------------------------
22# Common main for all deployments
23#
24#-------------------------------------------------------------------------------
25target_sources(ts-demo PRIVATE
Gabor Toth70cb3c62023-05-10 12:40:24 +020026 "${CMAKE_CURRENT_LIST_DIR}/ts-demo.c"
Julian Halleff4b282020-11-23 18:24:12 +010027)
28
29#-------------------------------------------------------------------------------
Gyorgy Szingec62ea72022-07-20 12:36:52 +000030# Components that are common across all deployments
Julian Halleff4b282020-11-23 18:24:12 +010031#
32#-------------------------------------------------------------------------------
33add_components(
34 TARGET "ts-demo"
35 BASE_DIR ${TS_ROOT}
36 COMPONENTS
37 "components/app/ts-demo"
Julian Halleff4b282020-11-23 18:24:12 +010038)
39
40#-------------------------------------------------------------------------------
Julian Halleff4b282020-11-23 18:24:12 +010041# Define install content.
42#
43#-------------------------------------------------------------------------------
44if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
45 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
46endif()
Gyorgy Szingc31afbf2021-02-12 01:51:55 +010047install(TARGETS ts-demo RUNTIME DESTINATION ${TS_ENV}/bin)