Julian Hall | 1911a12 | 2021-12-06 15:20:12 +0000 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Gabor Toth | 3a545e4 | 2023-11-07 15:17:40 +0100 | [diff] [blame] | 2 | # Copyright (c) 2021-2023, Arm Limited and Contributors. All rights reserved. |
Julian Hall | 1911a12 | 2021-12-06 15:20:12 +0000 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | |
| 8 | #------------------------------------------------------------------------------- |
| 9 | # The base build file shared between deployments of 'uefi-test' for |
| 10 | # different environments. Used for running end-to-end service-level tests |
| 11 | # against SMM service providers that implement UEFI services such as smm |
| 12 | # variable. |
| 13 | #------------------------------------------------------------------------------- |
| 14 | |
| 15 | #------------------------------------------------------------------------------- |
| 16 | # Use libts for locating and accessing services. An appropriate version of |
| 17 | # libts will be imported for the enviroment in which service tests are |
| 18 | # deployed. |
| 19 | #------------------------------------------------------------------------------- |
Gabor Toth | 76909ad | 2024-09-25 15:23:21 +0200 | [diff] [blame] | 20 | if (COVERAGE) |
| 21 | set(LIBTS_BUILD_TYPE "DEBUGCOVERAGE" CACHE STRING "Libts build type" FORCE) |
| 22 | endif() |
| 23 | |
Julian Hall | 1911a12 | 2021-12-06 15:20:12 +0000 | [diff] [blame] | 24 | include(${TS_ROOT}/deployments/libts/libts-import.cmake) |
Gyorgy Szing | ec62ea7 | 2022-07-20 12:36:52 +0000 | [diff] [blame] | 25 | target_link_libraries(uefi-test PRIVATE libts::ts) |
Julian Hall | 1911a12 | 2021-12-06 15:20:12 +0000 | [diff] [blame] | 26 | |
| 27 | #------------------------------------------------------------------------------- |
Gabor Toth | a1df025 | 2023-08-03 08:57:47 +0200 | [diff] [blame] | 28 | # Options and variables |
| 29 | #------------------------------------------------------------------------------- |
| 30 | option(UEFI_AUTH_VAR "Enable variable authentication" ON) |
| 31 | if (UEFI_AUTH_VAR) |
| 32 | target_compile_definitions(uefi-test PRIVATE |
| 33 | -DUEFI_AUTH_VAR |
| 34 | ) |
| 35 | endif() |
| 36 | |
| 37 | #------------------------------------------------------------------------------- |
Julian Hall | 1911a12 | 2021-12-06 15:20:12 +0000 | [diff] [blame] | 38 | # Components that are common accross all deployments |
| 39 | # |
| 40 | #------------------------------------------------------------------------------- |
| 41 | add_components( |
| 42 | TARGET "uefi-test" |
| 43 | BASE_DIR ${TS_ROOT} |
| 44 | COMPONENTS |
Julian Hall | 98656d5 | 2022-05-05 11:09:21 +0100 | [diff] [blame] | 45 | "components/service/uefi/smm_variable/client/cpp" |
| 46 | "components/service/uefi/smm_variable/test/service" |
Gabor Toth | 8ada783 | 2024-02-12 14:25:00 +0100 | [diff] [blame] | 47 | "components/common/uuid" |
Julian Hall | 1911a12 | 2021-12-06 15:20:12 +0000 | [diff] [blame] | 48 | ) |
| 49 | |
| 50 | #------------------------------------------------------------------------------- |
Julian Hall | 1911a12 | 2021-12-06 15:20:12 +0000 | [diff] [blame] | 51 | # Define install content. |
| 52 | # |
| 53 | #------------------------------------------------------------------------------- |
| 54 | if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
| 55 | set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE) |
| 56 | endif() |
| 57 | install(TARGETS uefi-test RUNTIME DESTINATION ${TS_ENV}/bin) |