blob: a832b07bb77bc4a1724f4ccb2c5be3eb47556070 [file] [log] [blame]
Alexei Frolov26e3ae62020-05-04 17:06:17 -07001# Copyright 2020 The Pigweed Authors
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4# use this file except in compliance with the License. You may obtain a copy of
5# the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations under
13# the License.
14
Wyatt Hepler0a6f7632020-10-29 09:08:19 -070015include($ENV{PW_ROOT}/pw_build/pigweed.cmake)
Wyatt Heplerc9e51d22020-10-29 09:12:37 -070016include($ENV{PW_ROOT}/pw_protobuf_compiler/proto.cmake)
Wyatt Hepler0a6f7632020-10-29 09:08:19 -070017
Wyatt Heplerc9e51d22020-10-29 09:12:37 -070018if(NOT "${dir_pw_third_party_nanopb}" STREQUAL "")
19 add_subdirectory(nanopb)
20endif()
21
22add_subdirectory(raw)
Wyatt Hepler7208cd92020-12-14 12:01:15 -080023add_subdirectory(system_server)
Wyatt Heplerc9e51d22020-10-29 09:12:37 -070024
25pw_add_module_library(pw_rpc.server
26 SOURCES
27 base_server_writer.cc
28 server.cc
29 service.cc
30 PUBLIC_DEPS
31 pw_rpc.common
32 PRIVATE_DEPS
33 pw_log
34)
35
36pw_add_module_library(pw_rpc.client
37 SOURCES
38 base_client_call.cc
39 client.cc
40 PUBLIC_DEPS
41 pw_rpc.common
42 PRIVATE_DEPS
43 pw_log
44)
45
46pw_add_module_library(pw_rpc.common
47 SOURCES
48 channel.cc
49 packet.cc
Alexei Frolov26e3ae62020-05-04 17:06:17 -070050 PUBLIC_DEPS
51 pw_assert
Wyatt Heplerc9e51d22020-10-29 09:12:37 -070052 pw_bytes
53 pw_containers
Alexei Frolov26e3ae62020-05-04 17:06:17 -070054 pw_span
Wyatt Heplerc9e51d22020-10-29 09:12:37 -070055 pw_status
56 pw_rpc.protos.pwpb
57 PRIVATE_DEPS
58 pw_log
59)
60
Alexei Frolove39af8d2020-12-30 14:55:09 -080061pw_add_module_library(pw_rpc.synchronized_channel_output
62 PUBLIC_DEPS
63 pw_rpc.common
64 pw_sync.mutex
65)
66
Wyatt Heplerc9e51d22020-10-29 09:12:37 -070067add_library(pw_rpc.test_utils INTERFACE)
68target_include_directories(pw_rpc.test_utils INTERFACE .)
69
70pw_proto_library(pw_rpc.protos
71 SOURCES
Wyatt Hepler752d7d32021-03-02 09:02:23 -080072 internal/packet.proto
73 echo.proto
74 INPUTS
75 echo.options
76 PREFIX
77 pw_rpc_protos
Wyatt Heplerc9e51d22020-10-29 09:12:37 -070078)
79
80pw_proto_library(pw_rpc.test_protos
81 SOURCES
82 pw_rpc_test_protos/test.proto
83)
84
85pw_auto_add_module_tests(pw_rpc
86 PRIVATE_DEPS
87 pw_rpc.client
88 pw_rpc.server
Alexei Frolov26e3ae62020-05-04 17:06:17 -070089)