-
Notifications
You must be signed in to change notification settings - Fork 44
/
CMakeLists.txt
74 lines (54 loc) · 2.11 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#-------------------------------------------------------------------------------
# Copyright (c) 2020-2023, Arm Limited. All rights reserved.
# Copyright (c) 2022 Cypress Semiconductor Corporation (an Infineon company)
# or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
#-------------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.21)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(version)
include(remote_library)
include(utils)
if(EXISTS ${CMAKE_SOURCE_DIR}/localrepos.cmake)
message(WARNING "Building using local repositories from \"" ${CMAKE_SOURCE_DIR}/localrepos.cmake "\"")
include(${CMAKE_SOURCE_DIR}/localrepos.cmake)
endif()
############################ CONFIGURATION #####################################
include(config/pre_config.cmake)
if(USE_KCONFIG_TOOL)
include(${CMAKE_SOURCE_DIR}/config/kconfig.cmake)
else()
include(${CMAKE_SOURCE_DIR}/config/set_config.cmake)
endif()
include(config/post_config.cmake)
############################### Compiler configuration #########################
include(${TFM_TOOLCHAIN_FILE})
set(CMAKE_C_COMPILER_FORCED true)
set(CMAKE_CXX_COMPILER_FORCED true)
project("Trusted Firmware M" VERSION ${TFM_VERSION} LANGUAGES C CXX ASM)
tfm_toolchain_reload_compiler()
add_subdirectory(lib/ext)
add_subdirectory(lib/fih)
add_subdirectory(tools)
add_subdirectory(secure_fw)
add_subdirectory(interface)
if(BL2)
add_subdirectory(bl2)
endif()
if(BL1 AND PLATFORM_DEFAULT_BL1)
add_subdirectory(bl1/bl1_2)
add_subdirectory(bl1/bl1_1)
endif()
add_subdirectory(platform)
if(CRYPTO_HW_ACCELERATOR)
add_subdirectory(platform/ext/accelerator)
endif()
if(IS_DIRECTORY ${CONFIG_TFM_TEST_DIR})
add_subdirectory(${CONFIG_TFM_TEST_DIR} ${CMAKE_CURRENT_BINARY_DIR}/tf-m-tests)
endif()
############################ Config Check ######################################
include(${CMAKE_SOURCE_DIR}/config/check_config.cmake)
################################################################################
include(cmake/install.cmake)