|
@@ -1,6 +1,8 @@
|
|
# -*- mode: python; -*- PYTHON-PREPROCESSING-REQUIRED
|
|
# -*- mode: python; -*- PYTHON-PREPROCESSING-REQUIRED
|
|
|
|
|
|
def _gen_dir(ctx):
|
|
def _gen_dir(ctx):
|
|
|
|
+ if ctx.attr.include == None:
|
|
|
|
+ return ""
|
|
if not ctx.attr.include:
|
|
if not ctx.attr.include:
|
|
return ctx.label.package
|
|
return ctx.label.package
|
|
if not ctx.label.package:
|
|
if not ctx.label.package:
|
|
@@ -70,7 +72,7 @@ def cc_proto_library(
|
|
srcs=[],
|
|
srcs=[],
|
|
deps=[],
|
|
deps=[],
|
|
cc_libs=[],
|
|
cc_libs=[],
|
|
- include="",
|
|
|
|
|
|
+ include=None,
|
|
protoc=":protoc",
|
|
protoc=":protoc",
|
|
internal_bootstrap_hack=False,
|
|
internal_bootstrap_hack=False,
|
|
**kargs):
|
|
**kargs):
|
|
@@ -119,9 +121,13 @@ def cc_proto_library(
|
|
outs=outs,
|
|
outs=outs,
|
|
)
|
|
)
|
|
|
|
|
|
|
|
+ includes = []
|
|
|
|
+ if include != None:
|
|
|
|
+ includes = [include]
|
|
|
|
+
|
|
native.cc_library(
|
|
native.cc_library(
|
|
name=name,
|
|
name=name,
|
|
srcs=outs,
|
|
srcs=outs,
|
|
deps=cc_libs + deps,
|
|
deps=cc_libs + deps,
|
|
- includes=[include],
|
|
|
|
|
|
+ includes=includes,
|
|
**kargs)
|
|
**kargs)
|