mirror of
https://github.com/bazel-contrib/rules_foreign_cc
synced 2024-12-04 08:02:31 +00:00
e285764b78
* Reorganized examples * Documentation * Third party
29 lines
744 B
Plaintext
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"],
|
|
}),
|
|
)
|