blob: c3635fe5e3c3adb391c8f8ecea3b904e60eb1569 [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
Alexei Frolov3e280922021-04-12 14:53:06 -070046pw_add_module_library(pw_rpc.client_server
47 SOURCES
48 client_server.cc
49 PUBLIC_DEPS
50 pw_rpc.client
51 pw_rpc.server
52)
53
Wyatt Heplerc9e51d22020-10-29 09:12:37 -070054pw_add_module_library(pw_rpc.common
55 SOURCES
56 channel.cc
57 packet.cc
Alexei Frolov26e3ae62020-05-04 17:06:17 -070058 PUBLIC_DEPS
59 pw_assert
Wyatt Heplerc9e51d22020-10-29 09:12:37 -070060 pw_bytes
61 pw_containers
Alexei Frolov26e3ae62020-05-04 17:06:17 -070062 pw_span
Wyatt Heplerc9e51d22020-10-29 09:12:37 -070063 pw_status
64 pw_rpc.protos.pwpb
65 PRIVATE_DEPS
66 pw_log
67)
68
Alexei Frolove39af8d2020-12-30 14:55:09 -080069pw_add_module_library(pw_rpc.synchronized_channel_output
70 PUBLIC_DEPS
71 pw_rpc.common
72 pw_sync.mutex
73)
74
Wyatt Heplerc9e51d22020-10-29 09:12:37 -070075add_library(pw_rpc.test_utils INTERFACE)
76target_include_directories(pw_rpc.test_utils INTERFACE .)
77
78pw_proto_library(pw_rpc.protos
79 SOURCES
Wyatt Hepler752d7d32021-03-02 09:02:23 -080080 internal/packet.proto
81 echo.proto
82 INPUTS
83 echo.options
84 PREFIX
Wyatt Heplerba325e42021-03-08 14:23:34 -080085 pw_rpc
Wyatt Heplerc9e51d22020-10-29 09:12:37 -070086)
87
88pw_proto_library(pw_rpc.test_protos
89 SOURCES
90 pw_rpc_test_protos/test.proto
91)
92
93pw_auto_add_module_tests(pw_rpc
94 PRIVATE_DEPS
95 pw_rpc.client
96 pw_rpc.server
Alexei Frolov26e3ae62020-05-04 17:06:17 -070097)