2
0
Fork 0
mirror of https://github.com/bazel-contrib/rules_foreign_cc synced 2024-11-28 08:43:26 +00:00
rules_foreign_cc/examples/third_party/zlib/BUILD.zlib.bazel

32 lines
742 B
Plaintext
Raw Normal View History

load("@rules_foreign_cc//tools/build_defs:cmake.bzl", "cmake_external")
package(default_visibility = ["//visibility:public"])
filegroup(
name = "all_srcs",
srcs = glob(["**"]),
)
cmake_external(
name = "zlib",
cmake_options = select({
"@platforms//os:windows": ["-GNinja"],
"//conditions:default": [],
}),
lib_source = ":all_srcs",
make_commands = select({
"@platforms//os:windows": [
"ninja",
"ninja install",
],
"//conditions:default": [
"make",
"make install",
],
}),
static_libraries = select({
"@platforms//os:windows": ["zlibstatic.lib"],
"//conditions:default": ["libz.a"],
}),
)