blob: d07e25c0f2021117220fe5908b6e3f18101c8e33 [file] [log] [blame]
Julian Hallb1d5d5f2020-11-23 18:23:48 +01001#-------------------------------------------------------------------------------
2# Copyright (c) 2020, 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 '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#-------------------------------------------------------------------------------
15# Components that are common accross all deployments
16#
17#-------------------------------------------------------------------------------
18add_components(
19 TARGET "ts"
20 BASE_DIR ${TS_ROOT}
21 COMPONENTS
22 "components/rpc/common/caller"
23 "components/rpc/common/interface"
24 "components/service/locator"
25 "components/service/locator/interface"
26)
27
28#-------------------------------------------------------------------------------
29# Define public interfaces for library
30#
31#-------------------------------------------------------------------------------
32
33# Enable exporting interface symbols for library public interface
34target_compile_definitions(ts PRIVATE
35 EXPORT_PUBLIC_INTERFACE_RPC_CALLER
36 EXPORT_PUBLIC_INTERFACE_SERVICE_LOCATOR
37)
38
39#-------------------------------------------------------------------------------
40# Export the library and the corresponding public interface header files
41#
42#-------------------------------------------------------------------------------
43include(${TS_ROOT}/tools/cmake/common/ExportLibrary.cmake REQUIRED)
44
45# Select public header files to export
46get_property(_rpc_caller_public_header_files TARGET ts
47 PROPERTY RPC_CALLER_PUBLIC_HEADER_FILES
48)
49
50get_property(_service_locator_public_header_files TARGET ts
51 PROPERTY SERVICE_LOCATOR_PUBLIC_HEADER_FILES
52)
53
54# Exports library information in preparation for install
55export_library(
56 TARGET "ts"
57 LIB_NAME "libts"
58 INTERFACE_FILES
59 ${_rpc_caller_public_header_files}
60 ${_service_locator_public_header_files}
61)