blob: 5f124f1c07617224f6e9bb42912e1a96df5ce7ff [file] [log] [blame]
Julian Hall56387ba2022-11-18 11:47:44 +00001#-------------------------------------------------------------------------------
2# Copyright (c) 2022-2023, Arm Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7if (NOT DEFINED TGT)
8 message(FATAL_ERROR "mandatory parameter TGT is not defined.")
9endif()
10
11target_sources(${TGT} PRIVATE
12 "${CMAKE_CURRENT_LIST_DIR}/installer.c"
13 "${CMAKE_CURRENT_LIST_DIR}/installer_index.c"
14 )
15
16# Configurable build parameters
17# TS_CFG_FWU_MAX_INSTALLERS Maximum number of installers allowed
18# TS_CFG_FWU_MAX_LOCATIONS Maximum number of updatable locations
19if(DEFINED TS_CFG_FWU_MAX_INSTALLERS)
20 target_compile_definitions(${TGT} PRIVATE
21 INSTALLER_INDEX_LIMIT=${TS_CFG_FWU_MAX_INSTALLERS})
22endif()
23
24if(DEFINED TS_CFG_FWU_MAX_LOCATIONS)
25 target_compile_definitions(${TGT} PRIVATE
26 INSTALLER_INDEX_LOCATION_ID_LIMIT=${TS_CFG_FWU_MAX_LOCATIONS})
27endif()