blob: d58620fea831fee1c216ed3cd67074a91cd7874a [file] [log] [blame]
Julian Halldd296222021-05-27 15:31:32 +01001#-------------------------------------------------------------------------------
2# Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
3#
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
15# libts will be imported for the enviroment in which service tests are
16# deployed.
17#-------------------------------------------------------------------------------
18include(${TS_ROOT}/deployments/libts/libts-import.cmake)
Gyorgy Szing49bfd5a2021-11-23 09:39:53 +010019target_link_libraries(${PROJECT_NAME} PRIVATE libts)
Julian Halldd296222021-05-27 15:31:32 +010020
21#-------------------------------------------------------------------------------
22# Components that are common accross all deployments
23#
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"
Julian Hall3e614542021-07-29 11:47:47 +010032 "components/service/discovery/client"
Julian Hall04460402021-07-08 17:40:57 +010033 "components/rpc/common/caller"
34 "components/rpc/common/logging"
Julian Halldd296222021-05-27 15:31:32 +010035)
36
Gyorgy Szing49bfd5a2021-11-23 09:39:53 +010037target_sources(${PROJECT_NAME} PRIVATE
Julian Halld4071382021-07-07 16:45:53 +010038 ${TS_ROOT}/deployments/psa-api-test/arch_test_runner.c
39)
40
Julian Halldd296222021-05-27 15:31:32 +010041#-------------------------------------------------------------------------------
42# Export project header paths for arch tests
43#
44#-------------------------------------------------------------------------------
Gyorgy Szing49bfd5a2021-11-23 09:39:53 +010045get_target_property(_include_paths ${PROJECT_NAME} INCLUDE_DIRECTORIES)
Julian Halldd296222021-05-27 15:31:32 +010046list(APPEND PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS ${_include_paths})
47
48#-------------------------------------------------------------------------------
49# Components used from external projects
50#
51#-------------------------------------------------------------------------------
52
53# psa-arch-tests
54include(${TS_ROOT}/external/psa_arch_tests/psa_arch_tests.cmake)
Gyorgy Szing49bfd5a2021-11-23 09:39:53 +010055target_link_libraries(${PROJECT_NAME} PRIVATE val_nspe test_combine pal_nspe)
Julian Halldd296222021-05-27 15:31:32 +010056
57#-------------------------------------------------------------------------------
58# Define install content.
59#
60#-------------------------------------------------------------------------------
61if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
62 set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE)
63endif()
Gyorgy Szing49bfd5a2021-11-23 09:39:53 +010064install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${TS_ENV}/bin)