blob: e5ee03b60b15bc4df24821a22a999604e63c6ac0 [file] [log] [blame]
Imre Kisd0ed5c22021-12-15 17:05:47 +01001#-------------------------------------------------------------------------------
Gabor Toth75951632023-09-06 09:17:28 +02002# Copyright (c) 2021-2023, Arm Limited and Contributors. All rights reserved.
Imre Kisd0ed5c22021-12-15 17:05:47 +01003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7
Gabor Tothbdc11a72023-12-13 09:02:15 +01008option(UEFI_INTERNAL_CRYPTO "Use internal mbedtls instance" OFF)
9
10if (UEFI_AUTH_VAR)
11
12# If enabled an internal mbedtls instance will be used instead of the crypto SP
13if (UEFI_INTERNAL_CRYPTO)
14set(MBEDTLS_USER_CONFIG_FILE "${TS_ROOT}/external/MbedTLS/config/x509_only.h"
15 CACHE STRING "Configuration file for Mbed TLS" FORCE)
16include(${TS_ROOT}/external/MbedTLS/MbedTLS.cmake)
17target_link_libraries(smm-gateway PRIVATE MbedTLS::mbedcrypto)
18target_link_libraries(smm-gateway PRIVATE MbedTLS::mbedx509)
19
20target_compile_definitions(smm-gateway PRIVATE
21 -DUEFI_INTERNAL_CRYPTO
22)
23
24add_components(TARGET "smm-gateway"
25 BASE_DIR ${TS_ROOT}
26 COMPONENTS
27 "components/service/uefi/smm_variable/backend/direct"
28)
29
30else()
31add_components(TARGET "smm-gateway"
32 BASE_DIR ${TS_ROOT}
33 COMPONENTS
34 "components/common/tlv"
35 "components/service/crypto/include"
36 "components/service/crypto/client/psa"
37)
38endif()
39
40endif()
41
Imre Kisd0ed5c22021-12-15 17:05:47 +010042add_components(TARGET "smm-gateway"
43 BASE_DIR ${TS_ROOT}
44 COMPONENTS
Julian Hall29620bf2022-06-09 10:26:37 +010045 "components/common/trace"
46 "components/common/utils"
Imre Kisd0ed5c22021-12-15 17:05:47 +010047 "components/common/uuid"
Imre Kisd0ed5c22021-12-15 17:05:47 +010048 "components/rpc/common/interface"
49 "components/service/common/include"
Imre Kisd0ed5c22021-12-15 17:05:47 +010050 "components/service/common/provider"
Julian Hall98656d52022-05-05 11:09:21 +010051 "components/service/uefi/smm_variable/backend"
52 "components/service/uefi/smm_variable/provider"
Imre Kisd0ed5c22021-12-15 17:05:47 +010053 "components/service/secure_storage/include"
Imre Kisd0ed5c22021-12-15 17:05:47 +010054 "components/service/secure_storage/backend/mock_store"
55 "protocols/rpc/common/packed-c"
Imre Kisd0ed5c22021-12-15 17:05:47 +010056)
57
Imre Kisd0ed5c22021-12-15 17:05:47 +010058target_include_directories(smm-gateway PRIVATE
59 ${TS_ROOT}
60 ${TS_ROOT}/components
61)