2
0
Fork 0
mirror of https://github.com/bazel-contrib/rules_foreign_cc synced 2024-12-04 08:02:31 +00:00
rules_foreign_cc/examples/third_party/cares/BUILD.cares.bazel
UebelAndre e285764b78
Restructed examples and enabled more testing (#515)
* Reorganized examples

* Documentation

* Third party
2021-02-26 20:21:13 +00:00

29 lines
744 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 = "cares",
cache_entries = {
"CARES_SHARED": "no",
"CARES_STATIC": "on",
},
cmake_options = ["-GNinja"],
lib_source = ":all_srcs",
make_commands = [
# The correct path to the ninja tool is detected from the selected ninja_toolchain.
# and "ninja" will be replaced with that path if needed
"ninja",
"ninja install",
],
static_libraries = select({
"@platforms//os:windows": ["cares.lib"],
"//conditions:default": ["libcares.a"],
}),
)