CMake: Support protobuf code gen; add pw_rpc

- Add proto.cmake and the pw_proto_library function. Like the GN
  version, this generates code for .proto files.
- Provide CMakeLists.txt for pw_protobuf, pw_rpc, and pw_hdlc_lite.
- Add a Nanopb wrapper CMakeLists.txt with a cache variable for Nanopb,
  similar to the variable for GN.

Change-Id: I15d09af8aa3575a86fc360787b117988a75f569e
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/22841
Reviewed-by: Zoltan Szatmary-Ban <szatmz@google.com>
Reviewed-by: Alexei Frolov <frolv@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
diff --git a/pw_rpc/nanopb/CMakeLists.txt b/pw_rpc/nanopb/CMakeLists.txt
new file mode 100644
index 0000000..9e1365b
--- /dev/null
+++ b/pw_rpc/nanopb/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Copyright 2020 The Pigweed Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+include($ENV{PW_ROOT}/pw_build/pigweed.cmake)
+
+pw_auto_add_simple_module(pw_rpc.nanopb
+  PUBLIC_DEPS
+    pw_rpc.client
+    pw_rpc.common
+    pw_rpc.raw
+    pw_rpc.server
+  PRIVATE_DEPS
+    pw_third_party.nanopb
+  TEST_DEPS
+    pw_rpc.echo_proto.nanopb_rpc
+    pw_rpc.test_protos.nanopb_rpc
+    pw_rpc.test_utils
+)