forked from 3rdparty/bazel-rules-libuv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
35 lines (33 loc) · 945 Bytes
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")
filegroup(
name = "all",
srcs = glob(["**"]),
visibility = ["//visibility:public"],
)
cmake(
name = "libuv",
visibility = ["//visibility:public"],
cache_entries = {
"CMAKE_BUILD_TYPE": "Release",
"BUILD_SHARED_LIBS": "OFF",
"LIBUV_BUILD_TESTS": "OFF",
"LIBUV_BUILD_BENCH": "OFF",
"CMAKE_SKIP_RPATH": "YES",
},
lib_source = ":all",
out_static_libs = select({
"@bazel_tools//src/conditions:windows": [
"Release/uv_a.lib",
],
"//conditions:default": ["libuv_a.a"],
}),
linkopts = select({
"@bazel_tools//src/conditions:windows": [
"WS2_32.Lib Advapi32.lib Iphlpapi.lib Userenv.lib User32.lib",
],
"@bazel_tools//src/conditions:darwin": [],
"//conditions:default": [
"-ldl",
],
}),
)