Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Gyorgy Szing | cc58199 | 2025-01-15 14:04:01 +0100 | [diff] [blame] | 2 | # Copyright (c) 2021-2025, 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 | |
Gyorgy Szing | cc58199 | 2025-01-15 14:04:01 +0100 | [diff] [blame] | 8 | # Check config options |
| 9 | foreach( _cfg IN ITEMS CFG_ENABLE_ITS CFG_ENABLE_PS CFG_ENABLE_CRYPTO CFG_ENABLE_IAT CFG_ENABLE_FWU) |
| 10 | if( NOT DEFINED ${_cfg}) |
| 11 | message(FATAL_ERROR "Mandatory variable \"${_cfg}\" is not defined.") |
| 12 | endif() |
| 13 | endforeach() |
| 14 | |
| 15 | target_include_directories(se-proxy PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}") |
| 16 | |
| 17 | #------------------------------------------------------------------------------- |
| 18 | # Service specific components |
| 19 | # |
| 20 | #------------------------------------------------------------------------------- |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 21 | add_components(TARGET "se-proxy" |
| 22 | BASE_DIR ${TS_ROOT} |
| 23 | COMPONENTS |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 24 | "components/common/tlv" |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 25 | "components/rpc/common/interface" |
Imre Kis | 16f0714 | 2023-07-05 18:15:07 +0200 | [diff] [blame] | 26 | "components/rpc/common/endpoint" |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 27 | "components/service/common/include" |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 28 | "components/service/common/client" |
| 29 | "components/service/common/provider" |
Gyorgy Szing | cc58199 | 2025-01-15 14:04:01 +0100 | [diff] [blame] | 30 | ) |
| 31 | |
| 32 | if (CFG_ENABLE_PS OR CFG_ENABLE_ITS) |
| 33 | add_components(TARGET "se-proxy" |
| 34 | BASE_DIR ${TS_ROOT} |
| 35 | COMPONENTS |
| 36 | "components/service/secure_storage/include" |
| 37 | "components/service/secure_storage/frontend/secure_storage_provider" |
| 38 | "protocols/service/secure_storage/packed-c" |
| 39 | ) |
| 40 | endif() |
| 41 | |
| 42 | if (CFG_ENABLE_CRYPTO) |
| 43 | add_components(TARGET "se-proxy" |
| 44 | BASE_DIR ${TS_ROOT} |
| 45 | COMPONENTS |
Gyorgy Szing | d6f795f | 2023-02-15 08:44:08 +0100 | [diff] [blame] | 46 | "components/service/crypto/client/psa" |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 47 | "components/service/crypto/include" |
| 48 | "components/service/crypto/provider" |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 49 | "components/service/crypto/provider/serializer/packed-c" |
| 50 | "components/service/crypto/provider/extension/hash" |
| 51 | "components/service/crypto/provider/extension/hash/serializer/packed-c" |
| 52 | "components/service/crypto/provider/extension/cipher" |
| 53 | "components/service/crypto/provider/extension/cipher/serializer/packed-c" |
| 54 | "components/service/crypto/provider/extension/key_derivation" |
| 55 | "components/service/crypto/provider/extension/key_derivation/serializer/packed-c" |
| 56 | "components/service/crypto/provider/extension/mac" |
| 57 | "components/service/crypto/provider/extension/mac/serializer/packed-c" |
Julian Hall | ee8e824 | 2022-02-11 14:24:53 +0000 | [diff] [blame] | 58 | "components/service/crypto/provider/extension/aead" |
| 59 | "components/service/crypto/provider/extension/aead/serializer/packed-c" |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 60 | "components/service/crypto/factory/full" |
Gyorgy Szing | cc58199 | 2025-01-15 14:04:01 +0100 | [diff] [blame] | 61 | ) |
| 62 | |
| 63 | if (CFG_ENABLE_CRYPTO_NANO) |
| 64 | add_components(TARGET "se-proxy" |
| 65 | BASE_DIR ${TS_ROOT} |
| 66 | COMPONENTS |
| 67 | "components/service/common/serializer/protobuf" |
| 68 | "components/service/crypto/provider/serializer/protobuf" |
| 69 | "protocols/service/crypto/protobuf" |
| 70 | ) |
| 71 | endif() |
| 72 | |
| 73 | endif() |
| 74 | |
| 75 | if(CFG_ENABLE_IAT) |
| 76 | add_components(TARGET "se-proxy" |
| 77 | BASE_DIR ${TS_ROOT} |
| 78 | COMPONENTS |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 79 | "components/service/attestation/include" |
| 80 | "components/service/attestation/provider" |
| 81 | "components/service/attestation/provider/serializer/packed-c" |
Julian Hall | 3d0ec04 | 2022-09-06 13:26:14 +0100 | [diff] [blame] | 82 | "protocols/rpc/common/packed-c" |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 83 | ) |
Gyorgy Szing | cc58199 | 2025-01-15 14:04:01 +0100 | [diff] [blame] | 84 | endif() |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 85 | |
Gyorgy Szing | cc58199 | 2025-01-15 14:04:01 +0100 | [diff] [blame] | 86 | if (CFG_ENABLE_FWU) |
| 87 | add_components(TARGET "se-proxy" |
| 88 | BASE_DIR ${TS_ROOT} |
| 89 | COMPONENTS |
| 90 | "components/service/fwu/common" |
| 91 | "components/service/fwu/provider" |
| 92 | "components/service/fwu/provider/serializer" |
| 93 | "components/service/secure_storage/backend/secure_storage_ipc" |
| 94 | ) |
| 95 | endif() |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 96 | #------------------------------------------------------------------------------- |
| 97 | # Components used from external projects |
| 98 | # |
| 99 | #------------------------------------------------------------------------------- |
| 100 | |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 101 | # Nanopb |
Gyorgy Szing | cc58199 | 2025-01-15 14:04:01 +0100 | [diff] [blame] | 102 | if (CFG_ENABLE_CRYPTO_NANO) |
| 103 | include(${TS_ROOT}/external/nanopb/nanopb.cmake) |
| 104 | target_link_libraries(se-proxy PRIVATE nanopb::protobuf-nanopb-static) |
| 105 | protobuf_generate_all(TGT "se-proxy" NAMESPACE "protobuf" BASE_DIR "${TS_ROOT}/protocols") |
| 106 | endif() |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 107 | |
Imre Kis | d0ed5c2 | 2021-12-15 17:05:47 +0100 | [diff] [blame] | 108 | ################################################################# |