Julian Hall | b1d5d5f | 2020-11-23 18:23:48 +0100 | [diff] [blame] | 1 | #------------------------------------------------------------------------------- |
Balint Dobszay | b22916e | 2021-05-26 11:13:00 +0200 | [diff] [blame^] | 2 | # Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved. |
Julian Hall | b1d5d5f | 2020-11-23 18:23:48 +0100 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | #------------------------------------------------------------------------------- |
| 7 | |
| 8 | #------------------------------------------------------------------------------- |
| 9 | # The base build file shared between deployments of 'libts' for |
| 10 | # different environments. libts provides a client interface for locating |
| 11 | # service instances and establishing RPC sessions for using services. |
| 12 | #------------------------------------------------------------------------------- |
| 13 | |
| 14 | #------------------------------------------------------------------------------- |
Balint Dobszay | b22916e | 2021-05-26 11:13:00 +0200 | [diff] [blame^] | 15 | # Common API version implemented by all libts deployments |
| 16 | #------------------------------------------------------------------------------- |
| 17 | version_semver_read(FILE "${CMAKE_CURRENT_LIST_DIR}/version.txt" |
| 18 | MAJOR _major MINOR _minor PATCH _patch) |
| 19 | set_target_properties(ts PROPERTIES VERSION "${_major}.${_minor}.${_patch}") |
| 20 | set_target_properties(ts PROPERTIES SOVERSION "${_major}") |
| 21 | unset(_major) |
| 22 | unset(_minor) |
| 23 | unset(_patch) |
| 24 | |
| 25 | #------------------------------------------------------------------------------- |
Julian Hall | b1d5d5f | 2020-11-23 18:23:48 +0100 | [diff] [blame] | 26 | # Components that are common accross all deployments |
| 27 | # |
| 28 | #------------------------------------------------------------------------------- |
| 29 | add_components( |
| 30 | TARGET "ts" |
| 31 | BASE_DIR ${TS_ROOT} |
| 32 | COMPONENTS |
| 33 | "components/rpc/common/caller" |
| 34 | "components/rpc/common/interface" |
| 35 | "components/service/locator" |
| 36 | "components/service/locator/interface" |
| 37 | ) |
| 38 | |
| 39 | #------------------------------------------------------------------------------- |
| 40 | # Define public interfaces for library |
| 41 | # |
| 42 | #------------------------------------------------------------------------------- |
| 43 | |
| 44 | # Enable exporting interface symbols for library public interface |
| 45 | target_compile_definitions(ts PRIVATE |
| 46 | EXPORT_PUBLIC_INTERFACE_RPC_CALLER |
| 47 | EXPORT_PUBLIC_INTERFACE_SERVICE_LOCATOR |
| 48 | ) |
| 49 | |
| 50 | #------------------------------------------------------------------------------- |
| 51 | # Export the library and the corresponding public interface header files |
| 52 | # |
| 53 | #------------------------------------------------------------------------------- |
| 54 | include(${TS_ROOT}/tools/cmake/common/ExportLibrary.cmake REQUIRED) |
| 55 | |
| 56 | # Select public header files to export |
| 57 | get_property(_rpc_caller_public_header_files TARGET ts |
| 58 | PROPERTY RPC_CALLER_PUBLIC_HEADER_FILES |
| 59 | ) |
| 60 | |
| 61 | get_property(_service_locator_public_header_files TARGET ts |
| 62 | PROPERTY SERVICE_LOCATOR_PUBLIC_HEADER_FILES |
| 63 | ) |
| 64 | |
| 65 | # Exports library information in preparation for install |
| 66 | export_library( |
| 67 | TARGET "ts" |
| 68 | LIB_NAME "libts" |
| 69 | INTERFACE_FILES |
| 70 | ${_rpc_caller_public_header_files} |
| 71 | ${_service_locator_public_header_files} |
| 72 | ) |