2021-03-12 16:54:14 +00:00
|
|
|
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")
|
2021-02-26 20:21:13 +00:00
|
|
|
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
|
|
|
filegroup(
|
|
|
|
name = "all_srcs",
|
2021-12-30 16:37:31 +00:00
|
|
|
srcs = glob(
|
|
|
|
include = ["**"],
|
|
|
|
exclude = ["*.bazel"],
|
|
|
|
),
|
2021-02-26 20:21:13 +00:00
|
|
|
)
|
|
|
|
|
2021-03-09 18:55:01 +00:00
|
|
|
cmake(
|
2021-02-26 20:21:13 +00:00
|
|
|
name = "zlib",
|
2021-04-12 15:23:42 +00:00
|
|
|
generate_args = select({
|
2021-02-26 20:21:13 +00:00
|
|
|
"@platforms//os:windows": ["-GNinja"],
|
|
|
|
"//conditions:default": [],
|
|
|
|
}),
|
|
|
|
lib_source = ":all_srcs",
|
2021-03-11 17:14:00 +00:00
|
|
|
out_static_libs = select({
|
2021-02-26 20:21:13 +00:00
|
|
|
"@platforms//os:windows": ["zlibstatic.lib"],
|
|
|
|
"//conditions:default": ["libz.a"],
|
|
|
|
}),
|
|
|
|
)
|