Commit 76982189 authored by donghuixu's avatar donghuixu

fix mcpack2pb bazel build error

parent d4312a1d
...@@ -256,9 +256,12 @@ cc_library( ...@@ -256,9 +256,12 @@ cc_library(
cc_library( cc_library(
name = "mcpack2pb", name = "mcpack2pb",
srcs = glob([ srcs = [
"src/mcpack2pb/*.cpp", "src/mcpack2pb/field_type.cpp",
]), "src/mcpack2pb/mcpack2pb.cpp",
"src/mcpack2pb/parser.cpp",
"src/mcpack2pb/serializer.cpp",
],
hdrs = glob([ hdrs = glob([
"src/mcpack2pb/*.h", "src/mcpack2pb/*.h",
]), ]),
...@@ -267,7 +270,7 @@ cc_library( ...@@ -267,7 +270,7 @@ cc_library(
], ],
deps = [ deps = [
":butil", ":butil",
":cc_brpc_internal_proto", ":cc_brpc_idl_options_proto",
"@com_google_protobuf//:protoc_lib", "@com_google_protobuf//:protoc_lib",
], ],
copts = COPTS, copts = COPTS,
...@@ -275,15 +278,26 @@ cc_library( ...@@ -275,15 +278,26 @@ cc_library(
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
brpc_proto_library(
name = "cc_brpc_idl_options_proto",
srcs = [
"src/idl_options.proto",
],
deps = [
"@com_google_protobuf//:cc_wkt_protos"
],
visibility = ["//visibility:public"],
)
brpc_proto_library( brpc_proto_library(
name = "cc_brpc_internal_proto", name = "cc_brpc_internal_proto",
srcs = glob([ srcs = glob([
"src/idl_options.proto",
"src/brpc/*.proto", "src/brpc/*.proto",
"src/brpc/policy/*.proto", "src/brpc/policy/*.proto",
]), ]),
include = "src/", include = "src/",
deps = [ deps = [
":cc_brpc_idl_options_proto",
"@com_google_protobuf//:cc_wkt_protos" "@com_google_protobuf//:cc_wkt_protos"
], ],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
...@@ -316,3 +330,17 @@ cc_library( ...@@ -316,3 +330,17 @@ cc_library(
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
cc_binary(
name = "protoc-gen-mcpack",
srcs = [
"src/mcpack2pb/generator.cpp",
],
deps = [
":cc_brpc_idl_options_proto",
":brpc",
],
copts = COPTS,
linkopts = LINKOPTS,
visibility = ["//visibility:public"],
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment