Alexei Frolov | 26e3ae6 | 2020-05-04 17:06:17 -0700 | [diff] [blame] | 1 | # 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 Hepler | 0a6f763 | 2020-10-29 09:08:19 -0700 | [diff] [blame] | 15 | include($ENV{PW_ROOT}/pw_build/pigweed.cmake) |
Wyatt Hepler | c9e51d2 | 2020-10-29 09:12:37 -0700 | [diff] [blame] | 16 | include($ENV{PW_ROOT}/pw_protobuf_compiler/proto.cmake) |
Wyatt Hepler | 0a6f763 | 2020-10-29 09:08:19 -0700 | [diff] [blame] | 17 | |
Wyatt Hepler | c9e51d2 | 2020-10-29 09:12:37 -0700 | [diff] [blame] | 18 | if(NOT "${dir_pw_third_party_nanopb}" STREQUAL "") |
| 19 | add_subdirectory(nanopb) |
| 20 | endif() |
| 21 | |
| 22 | add_subdirectory(raw) |
Wyatt Hepler | 7208cd9 | 2020-12-14 12:01:15 -0800 | [diff] [blame] | 23 | add_subdirectory(system_server) |
Wyatt Hepler | c9e51d2 | 2020-10-29 09:12:37 -0700 | [diff] [blame] | 24 | |
| 25 | pw_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 | |
| 36 | pw_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 | |
| 46 | pw_add_module_library(pw_rpc.common |
| 47 | SOURCES |
| 48 | channel.cc |
| 49 | packet.cc |
Alexei Frolov | 26e3ae6 | 2020-05-04 17:06:17 -0700 | [diff] [blame] | 50 | PUBLIC_DEPS |
| 51 | pw_assert |
Wyatt Hepler | c9e51d2 | 2020-10-29 09:12:37 -0700 | [diff] [blame] | 52 | pw_bytes |
| 53 | pw_containers |
Alexei Frolov | 26e3ae6 | 2020-05-04 17:06:17 -0700 | [diff] [blame] | 54 | pw_span |
Wyatt Hepler | c9e51d2 | 2020-10-29 09:12:37 -0700 | [diff] [blame] | 55 | pw_status |
| 56 | pw_rpc.protos.pwpb |
| 57 | PRIVATE_DEPS |
| 58 | pw_log |
| 59 | ) |
| 60 | |
Alexei Frolov | e39af8d | 2020-12-30 14:55:09 -0800 | [diff] [blame^] | 61 | pw_add_module_library(pw_rpc.synchronized_channel_output |
| 62 | PUBLIC_DEPS |
| 63 | pw_rpc.common |
| 64 | pw_sync.mutex |
| 65 | ) |
| 66 | |
Wyatt Hepler | c9e51d2 | 2020-10-29 09:12:37 -0700 | [diff] [blame] | 67 | add_library(pw_rpc.test_utils INTERFACE) |
| 68 | target_include_directories(pw_rpc.test_utils INTERFACE .) |
| 69 | |
| 70 | pw_proto_library(pw_rpc.protos |
| 71 | SOURCES |
| 72 | pw_rpc_protos/packet.proto |
| 73 | ) |
| 74 | |
| 75 | pw_proto_library(pw_rpc.echo_proto |
| 76 | SOURCES |
| 77 | pw_rpc_protos/echo.proto |
| 78 | ) |
| 79 | |
| 80 | pw_proto_library(pw_rpc.test_protos |
| 81 | SOURCES |
| 82 | pw_rpc_test_protos/test.proto |
| 83 | ) |
| 84 | |
| 85 | pw_auto_add_module_tests(pw_rpc |
| 86 | PRIVATE_DEPS |
| 87 | pw_rpc.client |
| 88 | pw_rpc.server |
Alexei Frolov | 26e3ae6 | 2020-05-04 17:06:17 -0700 | [diff] [blame] | 89 | ) |