mirror of
https://github.com/bazel-contrib/rules_foreign_cc
synced 2024-11-28 08:43:26 +00:00
32 lines
742 B
Plaintext
32 lines
742 B
Plaintext
|
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"],
|
||
|
}),
|
||
|
)
|