Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Gabor Toth | 7595163 | 2023-09-06 09:17:28 +0200 | [diff] [blame] | 2 | # Copyright (c) 2021-2023, Arm Limited and Contributors. All rights reserved. |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | |
Gabor Toth | bdc11a7 | 2023-12-13 09:02:15 +0100 | [diff] [blame] | 8 | option(UEFI_INTERNAL_CRYPTO "Use internal mbedtls instance" OFF) |
| 9 | |
| 10 | if (UEFI_AUTH_VAR) |
| 11 | |
| 12 | # If enabled an internal mbedtls instance will be used instead of the crypto SP |
| 13 | if (UEFI_INTERNAL_CRYPTO) |
| 14 | set(MBEDTLS_USER_CONFIG_FILE "${TS_ROOT}/external/MbedTLS/config/x509_only.h" |
| 15 | CACHE STRING "Configuration file for Mbed TLS" FORCE) |
| 16 | include(${TS_ROOT}/external/MbedTLS/MbedTLS.cmake) |
| 17 | target_link_libraries(smm-gateway PRIVATE MbedTLS::mbedcrypto) |
| 18 | target_link_libraries(smm-gateway PRIVATE MbedTLS::mbedx509) |
| 19 | |
| 20 | target_compile_definitions(smm-gateway PRIVATE |
| 21 | -DUEFI_INTERNAL_CRYPTO |
| 22 | ) |
| 23 | |
| 24 | add_components(TARGET "smm-gateway" |
| 25 | BASE_DIR ${TS_ROOT} |
| 26 | COMPONENTS |
| 27 | "components/service/uefi/smm_variable/backend/direct" |
| 28 | ) |
| 29 | |
| 30 | else() |
| 31 | add_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 | ) |
| 38 | endif() |
| 39 | |
| 40 | endif() |
| 41 | |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 42 | add_components(TARGET "smm-gateway" |
| 43 | BASE_DIR ${TS_ROOT} |
| 44 | COMPONENTS |
Julian Hall | 29620bf | 2022-06-09 10:26:37 +0100 | [diff] [blame] | 45 | "components/common/trace" |
| 46 | "components/common/utils" |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 47 | "components/common/uuid" |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 48 | "components/rpc/common/interface" |
| 49 | "components/service/common/include" |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 50 | "components/service/common/provider" |
Julian Hall | 98656d5 | 2022-05-05 11:09:21 +0100 | [diff] [blame] | 51 | "components/service/uefi/smm_variable/backend" |
| 52 | "components/service/uefi/smm_variable/provider" |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 53 | "components/service/secure_storage/include" |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 54 | "components/service/secure_storage/backend/mock_store" |
| 55 | "protocols/rpc/common/packed-c" |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 56 | ) |
| 57 | |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 58 | target_include_directories(smm-gateway PRIVATE |
| 59 | ${TS_ROOT} |
| 60 | ${TS_ROOT}/components |
| 61 | ) |