|
@@ -15,6 +15,12 @@ config_setting(
|
|
|
},
|
|
|
)
|
|
|
|
|
|
+################################################################################
|
|
|
+# ZLIB configuration
|
|
|
+################################################################################
|
|
|
+
|
|
|
+ZLIB_DEPS = ["//external:zlib"]
|
|
|
+
|
|
|
################################################################################
|
|
|
# Protobuf Runtime Library
|
|
|
################################################################################
|
|
@@ -42,6 +48,7 @@ COPTS = select({
|
|
|
":msvc" : MSVC_COPTS,
|
|
|
"//conditions:default": [
|
|
|
"-DHAVE_PTHREAD",
|
|
|
+ "-DHAVE_ZLIB",
|
|
|
"-Wall",
|
|
|
"-Woverloaded-virtual",
|
|
|
"-Wno-sign-compare",
|
|
@@ -117,6 +124,11 @@ cc_library(
|
|
|
visibility = ["//visibility:public"],
|
|
|
)
|
|
|
|
|
|
+PROTOBUF_DEPS = select({
|
|
|
+ ":msvc": [],
|
|
|
+ "//conditions:default": ZLIB_DEPS,
|
|
|
+})
|
|
|
+
|
|
|
cc_library(
|
|
|
name = "protobuf",
|
|
|
srcs = [
|
|
@@ -182,7 +194,7 @@ cc_library(
|
|
|
includes = ["src/"],
|
|
|
linkopts = LINK_OPTS,
|
|
|
visibility = ["//visibility:public"],
|
|
|
- deps = [":protobuf_lite"],
|
|
|
+ deps = [":protobuf_lite"] + PROTOBUF_DEPS,
|
|
|
)
|
|
|
|
|
|
# This provides just the header files for use in projects that need to build
|
|
@@ -590,7 +602,7 @@ cc_test(
|
|
|
":protobuf",
|
|
|
":protoc_lib",
|
|
|
"//external:gtest_main",
|
|
|
- ],
|
|
|
+ ] + PROTOBUF_DEPS,
|
|
|
)
|
|
|
|
|
|
################################################################################
|