Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
| 2 | # Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | |
| 8 | #------------------------------------------------------------------------------- |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 9 | # The base build file shared between deployments of 'psa-api-test' for |
| 10 | # different environments. Used for running PSA API tests. |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 11 | #------------------------------------------------------------------------------- |
| 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 | #------------------------------------------------------------------------------- |
| 18 | include(${TS_ROOT}/deployments/libts/libts-import.cmake) |
Gyorgy Szing | 49bfd5a | 2021-11-23 09:39:53 +0100 | [diff] [blame] | 19 | target_link_libraries(${PROJECT_NAME} PRIVATE libts) |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 20 | |
| 21 | #------------------------------------------------------------------------------- |
| 22 | # Components that are common accross all deployments |
| 23 | # |
| 24 | #------------------------------------------------------------------------------- |
| 25 | add_components( |
Gyorgy Szing | 49bfd5a | 2021-11-23 09:39:53 +0100 | [diff] [blame] | 26 | TARGET "${PROJECT_NAME}" |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 27 | BASE_DIR ${TS_ROOT} |
| 28 | COMPONENTS |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 29 | "components/common/tlv" |
Julian Hall | 99a57e3 | 2021-07-28 14:18:50 +0100 | [diff] [blame] | 30 | "components/service/common/client" |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 31 | "components/service/common/include" |
Julian Hall | 3e61454 | 2021-07-29 11:47:47 +0100 | [diff] [blame] | 32 | "components/service/discovery/client" |
Julian Hall | 0446040 | 2021-07-08 17:40:57 +0100 | [diff] [blame] | 33 | "components/rpc/common/caller" |
| 34 | "components/rpc/common/logging" |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 35 | ) |
| 36 | |
Gyorgy Szing | 49bfd5a | 2021-11-23 09:39:53 +0100 | [diff] [blame] | 37 | target_sources(${PROJECT_NAME} PRIVATE |
Julian Hall | d407138 | 2021-07-07 16:45:53 +0100 | [diff] [blame] | 38 | ${TS_ROOT}/deployments/psa-api-test/arch_test_runner.c |
| 39 | ) |
| 40 | |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 41 | #------------------------------------------------------------------------------- |
| 42 | # Export project header paths for arch tests |
| 43 | # |
| 44 | #------------------------------------------------------------------------------- |
Gyorgy Szing | 49bfd5a | 2021-11-23 09:39:53 +0100 | [diff] [blame] | 45 | get_target_property(_include_paths ${PROJECT_NAME} INCLUDE_DIRECTORIES) |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 46 | list(APPEND PSA_ARCH_TESTS_EXTERNAL_INCLUDE_PATHS ${_include_paths}) |
| 47 | |
| 48 | #------------------------------------------------------------------------------- |
| 49 | # Components used from external projects |
| 50 | # |
| 51 | #------------------------------------------------------------------------------- |
| 52 | |
| 53 | # psa-arch-tests |
| 54 | include(${TS_ROOT}/external/psa_arch_tests/psa_arch_tests.cmake) |
Gyorgy Szing | 49bfd5a | 2021-11-23 09:39:53 +0100 | [diff] [blame] | 55 | target_link_libraries(${PROJECT_NAME} PRIVATE val_nspe test_combine pal_nspe) |
Julian Hall | dd29622 | 2021-05-27 15:31:32 +0100 | [diff] [blame] | 56 | |
| 57 | #------------------------------------------------------------------------------- |
| 58 | # Define install content. |
| 59 | # |
| 60 | #------------------------------------------------------------------------------- |
| 61 | if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
| 62 | set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "location to install build output to." FORCE) |
| 63 | endif() |
Gyorgy Szing | 49bfd5a | 2021-11-23 09:39:53 +0100 | [diff] [blame] | 64 | install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${TS_ENV}/bin) |