Commit ffbf054d authored by Zhangyi Chen's avatar Zhangyi Chen

Add zlib as an external dependency

parent 3feb6d0c
...@@ -78,9 +78,6 @@ COPTS = [ ...@@ -78,9 +78,6 @@ COPTS = [
LINKOPTS = [ LINKOPTS = [
"-lpthread", "-lpthread",
"-ldl", "-ldl",
"-lz",
# "-lssl",
# "-lcrypto",
] + select({ ] + select({
":darwin": [ ":darwin": [
"-framework CoreFoundation", "-framework CoreFoundation",
...@@ -340,6 +337,7 @@ cc_library( ...@@ -340,6 +337,7 @@ cc_library(
deps = [ deps = [
"@com_google_protobuf//:protobuf", "@com_google_protobuf//:protobuf",
"@com_github_gflags_gflags//:gflags", "@com_github_gflags_gflags//:gflags",
"@zlib//:zlib",
] + select({ ] + select({
":with_glog": ["@com_github_google_glog//:glog"], ":with_glog": ["@com_github_google_glog//:glog"],
"//conditions:default": [], "//conditions:default": [],
......
...@@ -87,3 +87,9 @@ bind( ...@@ -87,3 +87,9 @@ bind(
name = "ssl_macos", name = "ssl_macos",
actual = "@openssl_macos//:ssl" actual = "@openssl_macos//:ssl"
) )
new_local_repository(
name = "zlib",
build_file = "//:zlib.BUILD",
path = "/usr",
)
...@@ -26,7 +26,7 @@ cc_library( ...@@ -26,7 +26,7 @@ cc_library(
name = "ssl", name = "ssl",
hdrs = select({ hdrs = select({
":macos": glob(["include/openssl/*.h"]), ":macos": glob(["include/openssl/*.h"]),
"//conditions:default": ["lib/libssl.so"] "//conditions:default": []
}), }),
srcs = select ({ srcs = select ({
":macos": ["lib/libssl.dylib"], ":macos": ["lib/libssl.dylib"],
......
package(
default_visibility=["//visibility:public"]
)
cc_library(
name = "zlib",
linkopts = ["-lz"],
)
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