blob: 56243cc7bbdddfe37834609f971f7ca6a63c3e94 [file] [log] [blame]
Chris Kayfdee5cb2021-08-19 14:38:45 +01001#[=======================================================================[.rst:
2TFAMetadata
3-----------
4
5.. default-domain:: cmake
6
7Metadata management utilities for TF-A.
8
9TF-A uses a set of JSON-formatted metadata files to manage some of its
10configuration data. This module provides a stable CMake interface for retrieving
11values from these metadata files.
12#]=======================================================================]
13
14include_guard()
15
16include(ArmAssert)
17include(ArmExpand)
18
19include(TFAJsonUtilities)
20
21#
22# Read the global metadata file. This is a JSON-formatted file that contains
23# information about the contents of the repository that are relevant to the
24# build system.
25#
26
27arm_assert(CONDITION EXISTS "${CMAKE_SOURCE_DIR}/metadata.json")
28
29file(READ "${CMAKE_SOURCE_DIR}/metadata.json" global-metadata)
30arm_expand(OUTPUT global-metadata STRING "${global-metadata}")
31
32#
33# Internal global metadata API.
34#
35
36tfa_json_getter(tfa_metadata
37 JSON "${global-metadata}")
38
39#
40# External global metadata API.
41#