third_party: Add nanopb BUILD.gn file

This change creates a Pigweed third_party directory and defines a GN
build file for nanopb which exposes a pw_source_set for the nanopb
library from a build arg pointing to a local nanopb installation.

Change-Id: I6779203626abce7821dc3fcef6dcbc11c319b43c
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/15763
Reviewed-by: Keir Mierle <keir@google.com>
diff --git a/pw_protobuf_compiler/proto.gni b/pw_protobuf_compiler/proto.gni
index d2652b5..9ddcfa3 100644
--- a/pw_protobuf_compiler/proto.gni
+++ b/pw_protobuf_compiler/proto.gni
@@ -18,7 +18,7 @@
 import("$dir_pw_build/input_group.gni")
 import("$dir_pw_build/python_script.gni")
 import("$dir_pw_build/target_types.gni")
-import("nanopb.gni")
+import("$dir_pw_third_party/nanopb/nanopb.gni")
 declare_args() {
   # Generators with which to compile protobuf code. These are used by the
   # pw_proto_library template to determine which build targets to create.
@@ -162,8 +162,8 @@
     all_dependent_configs = [ ":$_include_config_target" ]
     deps = [ ":$_gen_target" ]
     public_deps = [
-                    dir_pw_third_party_nanopb,
                     "$dir_pw_rpc:nanopb_server",
+                    "$dir_pw_third_party/nanopb",
                   ] + invoker.gen_deps
     public = get_target_outputs(":$_gen_target")
   }
@@ -244,7 +244,7 @@
   pw_source_set(target_name) {
     all_dependent_configs = [ ":$_include_config_target" ]
     deps = [ ":$_gen_target" ]
-    public_deps = [ dir_pw_third_party_nanopb ] + invoker.gen_deps
+    public_deps = [ "$dir_pw_third_party/nanopb" ] + invoker.gen_deps
     sources = get_target_outputs(":$_gen_target")
     public = filter_include(sources, [ "*.pb.h" ])
   }