blob: 739ed262dddd64274d8607534bee1b28fc7c7a9c [file] [log] [blame]
Julian Halldd296222021-05-27 15:31:32 +01001#-------------------------------------------------------------------------------
Gyorgy Szingec62ea72022-07-20 12:36:52 +00002# Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved.
Julian Halldd296222021-05-27 15:31:32 +01003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6#-------------------------------------------------------------------------------
7
8#-------------------------------------------------------------------------------
Julian Halld4071382021-07-07 16:45:53 +01009# The base build file shared between deployments of 'psa-api-test' for
10# different environments. Used for running PSA API tests.
Julian Halldd296222021-05-27 15:31:32 +010011#-------------------------------------------------------------------------------
12
13#-------------------------------------------------------------------------------
14# Use libts for locating and accessing services. An appropriate version of
Gyorgy Szingec62ea72022-07-20 12:36:52 +000015# libts will be imported for the environment in which service tests are
Julian Halldd296222021-05-27 15:31:32 +010016# deployed.
17#-------------------------------------------------------------------------------
18include(${TS_ROOT}/deployments/libts/libts-import.cmake)
Gyorgy Szingec62ea72022-07-20 12:36:52 +000019target_link_libraries(${PROJECT_NAME} PRIVATE libts::ts)
Julian Halldd296222021-05-27 15:31:32 +010020
21#-------------------------------------------------------------------------------
Gyorgy Szingec62ea72022-07-20 12:36:52 +000022# Components that are common across all deployments
Julian Halldd296222021-05-27 15:31:32 +010023#
24#-------------------------------------------------------------------------------
25add_components(
Gyorgy Szing49bfd5a2021-11-23 09:39:53 +010026 TARGET "${PROJECT_NAME}"
Julian Halldd296222021-05-27 15:31:32 +010027 BASE_DIR ${TS_ROOT}
28 COMPONENTS
Julian Halld4071382021-07-07 16:45:53 +010029 "components/common/tlv"
Julian Hall99a57e32021-07-28 14:18:50 +010030 "components/service/common/client"
Julian Halldd296222021-05-27 15:31:32 +010031 "components/service/common/include"
32)
33
Gyorgy Szing49bfd5a2021-11-23 09:39:53 +010034target_sources(${PROJECT_NAME} PRIVATE
Julian Halld4071382021-07-07 16:45:53 +010035 ${TS_ROOT}/deployments/psa-api-test/arch_test_runner.c
36)
37
Julian Halldd296222021-05-27 15:31:32 +010038#-------------------------------------------------------------------------------
39# Export project header paths for arch tests
40#
41#-------------------------------------------------------------------------------
Gyorgy Szing49bfd5a2021-11-23 09:39:53 +010042get_target_property(_include_paths ${PROJECT_NAME} INCLUDE_DIRECTORIES)
Julian Halldd296222021-05-27 15:31:32 +010043list(APPEND PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS ${_include_paths})
44
45#-------------------------------------------------------------------------------
46# Components used from external projects
47#
48#-------------------------------------------------------------------------------
49
50# psa-arch-tests
51include(${TS_ROOT}/external/psa_arch_tests/psa_arch_tests.cmake)
Gyorgy Szing49bfd5a2021-11-23 09:39:53 +010052target_link_libraries(${PROJECT_NAME} PRIVATE val_nspe test_combine pal_nspe)
Julian Halldd296222021-05-27 15:31:32 +010053
54#-------------------------------------------------------------------------------
55# Define install content.
56#
57#-------------------------------------------------------------------------------
58if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
59 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
60endif()
Gyorgy Szing49bfd5a2021-11-23 09:39:53 +010061install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${TS_ENV}/bin)