diff options
author | Jorge Canizales <jcanizales@google.com> | 2015-06-20 09:47:00 -0700 |
---|---|---|
committer | Jorge Canizales <jcanizales@google.com> | 2015-06-23 22:43:49 -0700 |
commit | 140bca8c5c1fdb691136555075fb99e39a45b5d2 (patch) | |
tree | 3a4fa7e21e441f7f9cd42b5c9ab1e4326a474b59 /templates/BUILD.template | |
parent | 870af21d65b6b21bb2dd6127797eee86c1aef727 (diff) |
Generate objc_library for grpc_unsecure & gpr
Diffstat (limited to 'templates/BUILD.template')
-rw-r--r-- | templates/BUILD.template | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/templates/BUILD.template b/templates/BUILD.template index ec5fb3584f..acb46f1207 100644 --- a/templates/BUILD.template +++ b/templates/BUILD.template @@ -63,6 +63,12 @@ ${cc_library(lib)} % endif % endfor +% for lib in libs: +% if lib.name in ("grpc_unsecure", "gpr"): +${objc_library(lib)} +% endif +% endfor + % for tgt in targets: % if tgt.build == 'protoc': ${cc_binary(tgt)} @@ -97,6 +103,34 @@ cc_library( ) </%def> +<%def name="objc_library(lib)"> +objc_library( + name = "${lib.name}_objc", + srcs = [ +% for src in lib.src: + "${src}", +% endfor + ], + hdrs = [ +% for hdr in lib.get("public_headers", []): + "${hdr}", +% endfor +% for hdr in lib.get("headers", []): + "${hdr}", +% endfor + ], + includes = [ + "include", + ".", + ], + deps = [ +% for dep in lib.get("deps", []): + ":${dep}_objc", +% endfor + ], +) +</%def> + <%def name="cc_binary(tgt)"> cc_binary( name = "${tgt.name}", |