pw_protobuf: Provide an Empty proto message

Provide a pw.protobuf.Empty message for general use.

Change-Id: I2ee3d8d25602e2a8e59b30853950185f9c18624c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/26021
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
diff --git a/pw_protobuf/BUILD.gn b/pw_protobuf/BUILD.gn
index 00eae35..ebe8636 100644
--- a/pw_protobuf/BUILD.gn
+++ b/pw_protobuf/BUILD.gn
@@ -89,6 +89,10 @@
   sources = [ "codegen_test.cc" ]
 }
 
+pw_proto_library("common_protos") {
+  sources = [ "pw_protobuf_protos/common.proto" ]
+}
+
 pw_proto_library("codegen_test_protos") {
   sources = [
     "pw_protobuf_protos/test_protos/full_test.proto",
@@ -98,6 +102,7 @@
     "pw_protobuf_protos/test_protos/proto2.proto",
     "pw_protobuf_protos/test_protos/repeated.proto",
   ]
+  deps = [ ":common_protos" ]
 }
 
 pw_fuzzer("encoder_fuzzer") {
diff --git a/pw_protobuf/pw_protobuf_protos/common.proto b/pw_protobuf/pw_protobuf_protos/common.proto
new file mode 100644
index 0000000..3e6aadf
--- /dev/null
+++ b/pw_protobuf/pw_protobuf_protos/common.proto
@@ -0,0 +1,19 @@
+// 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.
+
+syntax = "proto3";
+
+package pw.protobuf;
+
+message Empty {}
diff --git a/pw_protobuf/pw_protobuf_protos/test_protos/importer.proto b/pw_protobuf/pw_protobuf_protos/test_protos/importer.proto
index 298a88c..3f0e43b 100644
--- a/pw_protobuf/pw_protobuf_protos/test_protos/importer.proto
+++ b/pw_protobuf/pw_protobuf_protos/test_protos/importer.proto
@@ -14,6 +14,7 @@
 syntax = "proto3";
 
 import 'pw_protobuf_protos/test_protos/imported.proto';
+import 'pw_protobuf_protos/common.proto';
 
 package pw.protobuf.test;
 
@@ -21,3 +22,7 @@
   imported.Timestamp start = 1;
   imported.Timestamp end = 2;
 }
+
+message Nothing {
+  pw.protobuf.Empty nothing = 1;
+}
diff --git a/pw_protobuf_compiler/proto.gni b/pw_protobuf_compiler/proto.gni
index f7b1a28..6331537 100644
--- a/pw_protobuf_compiler/proto.gni
+++ b/pw_protobuf_compiler/proto.gni
@@ -252,7 +252,7 @@
     deps = process_file_template(_deps, "{{source}}._metadata")
 
     data_keys = [ "protoc_includes" ]
-    outputs = [ "$target_gen_dir/${target_name}_includes.txt" ]
+    outputs = [ "$target_gen_dir/${_common.base_target}_includes.txt" ]
 
     # Indicate this library's base directory for its dependents.
     metadata = {