blob: ea678d0e1f3d2010733cd25e520a6acc8586e407 [file] [log] [blame]
Julian Hall1911a122021-12-06 15:20:12 +00001#-------------------------------------------------------------------------------
2# Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
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#-------------------------------------------------------------------------------
20include(${TS_ROOT}/deployments/libts/libts-import.cmake)
21target_link_libraries(uefi-test PRIVATE libts)
22
23#-------------------------------------------------------------------------------
24# Components that are common accross all deployments
25#
26#-------------------------------------------------------------------------------
27add_components(
28 TARGET "uefi-test"
29 BASE_DIR ${TS_ROOT}
30 COMPONENTS
31 "components/service/smm_variable/client/cpp"
32 "components/service/smm_variable/test/service"
33)
34
35#-------------------------------------------------------------------------------
36# Components used from external projects
37#
38#-------------------------------------------------------------------------------
39
40# Nanopb
41include(${TS_ROOT}/external/nanopb/nanopb.cmake)
42target_link_libraries(uefi-test PRIVATE nanopb::protobuf-nanopb-static)
43protobuf_generate_all(TGT "uefi-test" NAMESPACE "protobuf" BASE_DIR "${TS_ROOT}/protocols")
44
45#-------------------------------------------------------------------------------
46# Define install content.
47#
48#-------------------------------------------------------------------------------
49if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
50 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
51endif()
52install(TARGETS uefi-test RUNTIME DESTINATION ${TS_ENV}/bin)