Balint Dobszay | 72c3f04 | 2020-11-23 18:23:57 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Gyorgy Szing | 8a1e7f4 | 2023-07-26 18:26:48 +0200 | [diff] [blame] | 2 | # Copyright (c) 2020-2023, Arm Limited and Contributors. All rights reserved. |
Balint Dobszay | 72c3f04 | 2020-11-23 18:23:57 +0100 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
Balint Dobszay | 047aea8 | 2022-05-16 14:20:53 +0200 | [diff] [blame] | 7 | cmake_minimum_required(VERSION 3.18 FATAL_ERROR) |
Balint Dobszay | 72c3f04 | 2020-11-23 18:23:57 +0100 | [diff] [blame] | 8 | include(../../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 | #------------------------------------------------------------------------------- |
| 16 | include(${TS_ROOT}/environments/opteesp/env.cmake) |
| 17 | project(trusted-services LANGUAGES C ASM) |
| 18 | add_executable(sfs-demo) |
Jelle Sels | 4960c41 | 2023-02-01 09:43:24 +0100 | [diff] [blame] | 19 | set(SP_BIN_UUID_CANON "01109cf8-e5ca-446f-9b55-f3cdc65110c8") |
| 20 | set(SP_FFA_UUID_CANON "${TS_RPC_UUID_CANON}") |
| 21 | |
Imre Kis | eeee964 | 2021-12-17 13:59:46 +0100 | [diff] [blame] | 22 | set(SP_HEAP_SIZE "32 * 1024" CACHE STRING "SP heap size in bytes") |
Imre Kis | 2ccd8e8 | 2021-10-08 11:21:14 +0200 | [diff] [blame] | 23 | set(TRACE_PREFIX "SFSDEMO" CACHE STRING "Trace prefix") |
Balint Dobszay | 72c3f04 | 2020-11-23 18:23:57 +0100 | [diff] [blame] | 24 | |
Balint Dobszay | 72c3f04 | 2020-11-23 18:23:57 +0100 | [diff] [blame] | 25 | add_components(TARGET "sfs-demo" |
| 26 | BASE_DIR ${TS_ROOT} |
| 27 | COMPONENTS |
Balint Dobszay | 72c3f04 | 2020-11-23 18:23:57 +0100 | [diff] [blame] | 28 | environments/opteesp |
| 29 | ) |
| 30 | |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 31 | include(../sfs-demo.cmake REQUIRED) |
Balint Dobszay | 72c3f04 | 2020-11-23 18:23:57 +0100 | [diff] [blame] | 32 | |
| 33 | target_compile_definitions(sfs-demo PRIVATE |
| 34 | ARM64=1 |
| 35 | ) |
| 36 | |
| 37 | target_include_directories(sfs-demo PRIVATE |
Balint Dobszay | 72c3f04 | 2020-11-23 18:23:57 +0100 | [diff] [blame] | 38 | ${TS_ROOT}/deployments/sfs-demo/opteesp |
| 39 | ) |
| 40 | |
| 41 | if(CMAKE_C_COMPILER_ID STREQUAL "GNU") |
| 42 | target_compile_options(sfs-demo PRIVATE |
Andrew Beggs | 97a00d4 | 2021-06-15 15:45:46 +0000 | [diff] [blame] | 43 | -std=c99 |
Balint Dobszay | 72c3f04 | 2020-11-23 18:23:57 +0100 | [diff] [blame] | 44 | ) |
| 45 | |
Balint Dobszay | 72c3f04 | 2020-11-23 18:23:57 +0100 | [diff] [blame] | 46 | endif() |
| 47 | |
Balint Dobszay | 72c3f04 | 2020-11-23 18:23:57 +0100 | [diff] [blame] | 48 | ######################################## install |
| 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() |
Imre Kis | 5a35dda | 2022-03-03 11:38:12 +0100 | [diff] [blame] | 52 | install(TARGETS sfs-demo |
| 53 | PUBLIC_HEADER DESTINATION ${TS_ENV}/include |
| 54 | RUNTIME DESTINATION ${TS_ENV}/bin |
| 55 | ) |
Imre Kis | 5a35dda | 2022-03-03 11:38:12 +0100 | [diff] [blame] | 56 | |
| 57 | include(${TS_ROOT}/tools/cmake/common/ExportSp.cmake) |
| 58 | export_sp( |
Jelle Sels | 4960c41 | 2023-02-01 09:43:24 +0100 | [diff] [blame] | 59 | SP_FFA_UUID_CANON ${SP_FFA_UUID_CANON} |
| 60 | SP_BIN_UUID_CANON ${SP_BIN_UUID_CANON} |
Imre Kis | 5a35dda | 2022-03-03 11:38:12 +0100 | [diff] [blame] | 61 | SP_NAME "sfs-demo" |
| 62 | MK_IN ${TS_ROOT}/environments/opteesp/sp.mk.in |
| 63 | DTS_IN ${CMAKE_CURRENT_LIST_DIR}/default_sfs-demo.dts.in |
| 64 | JSON_IN ${TS_ROOT}/environments/opteesp/sp_pkg.json.in |
| 65 | ) |