blob: 22b624c658493a2ba16b1a1e25d2b8360c852516 [file] [log] [blame]
Balint Dobszay72c3f042020-11-23 18:23:57 +01001#-------------------------------------------------------------------------------
Gyorgy Szing8a1e7f42023-07-26 18:26:48 +02002# Copyright (c) 2020-2023, Arm Limited and Contributors. All rights reserved.
Balint Dobszay72c3f042020-11-23 18:23:57 +01003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
Balint Dobszay047aea82022-05-16 14:20:53 +02007cmake_minimum_required(VERSION 3.18 FATAL_ERROR)
Balint Dobszay72c3f042020-11-23 18:23:57 +01008include(../../deployment.cmake REQUIRED)
9
10#-------------------------------------------------------------------------------
11# The CMakeLists.txt for building the sfs-demo deployment for opteesp
12#
13# Used for building a demo sp that acts as a client of the secure storage
14# service, deployed in another sp.
15#-------------------------------------------------------------------------------
16include(${TS_ROOT}/environments/opteesp/env.cmake)
17project(trusted-services LANGUAGES C ASM)
18add_executable(sfs-demo)
Balint Dobszayc9daea92022-06-15 15:17:11 +020019set(SP_UUID_CANON "01109cf8-e5ca-446f-9b55-f3cdc65110c8")
Imre Kiseeee9642021-12-17 13:59:46 +010020set(SP_HEAP_SIZE "32 * 1024" CACHE STRING "SP heap size in bytes")
Imre Kis2ccd8e82021-10-08 11:21:14 +020021set(TRACE_PREFIX "SFSDEMO" CACHE STRING "Trace prefix")
Balint Dobszay72c3f042020-11-23 18:23:57 +010022
Balint Dobszay72c3f042020-11-23 18:23:57 +010023add_components(TARGET "sfs-demo"
24 BASE_DIR ${TS_ROOT}
25 COMPONENTS
Balint Dobszay72c3f042020-11-23 18:23:57 +010026 environments/opteesp
27)
28
Imre Kisd0ed5c22021-12-15 17:05:47 +010029include(../sfs-demo.cmake REQUIRED)
Balint Dobszay72c3f042020-11-23 18:23:57 +010030
31target_compile_definitions(sfs-demo PRIVATE
32 ARM64=1
33)
34
35target_include_directories(sfs-demo PRIVATE
Balint Dobszay72c3f042020-11-23 18:23:57 +010036 ${TS_ROOT}/deployments/sfs-demo/opteesp
37)
38
39if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
40 target_compile_options(sfs-demo PRIVATE
Andrew Beggs97a00d42021-06-15 15:45:46 +000041 -std=c99
Balint Dobszay72c3f042020-11-23 18:23:57 +010042 )
43
Balint Dobszay72c3f042020-11-23 18:23:57 +010044endif()
45
Balint Dobszay72c3f042020-11-23 18:23:57 +010046######################################## install
47if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
48 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
49endif()
Imre Kis5a35dda2022-03-03 11:38:12 +010050install(TARGETS sfs-demo
51 PUBLIC_HEADER DESTINATION ${TS_ENV}/include
52 RUNTIME DESTINATION ${TS_ENV}/bin
53 )
Imre Kis5a35dda2022-03-03 11:38:12 +010054
55include(${TS_ROOT}/tools/cmake/common/ExportSp.cmake)
56export_sp(
Balint Dobszayc9daea92022-06-15 15:17:11 +020057 SP_UUID_CANON ${SP_UUID_CANON}
Imre Kis5a35dda2022-03-03 11:38:12 +010058 SP_NAME "sfs-demo"
59 MK_IN ${TS_ROOT}/environments/opteesp/sp.mk.in
60 DTS_IN ${CMAKE_CURRENT_LIST_DIR}/default_sfs-demo.dts.in
61 JSON_IN ${TS_ROOT}/environments/opteesp/sp_pkg.json.in
62)