forked from 3rdparty/bazel-rules-curl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
39 lines (37 loc) · 993 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
36
37
38
39
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")
filegroup(
name = "all",
srcs = glob(["**"]),
visibility = ["//visibility:public"],
)
cmake(
name = "libcurl",
cache_entries = {
"CMAKE_BUILD_TYPE": "Release",
"BUILD_SHARED_LIBS": "OFF",
"BUILD_TESTING": "OFF",
"CMAKE_USE_OPENSSL": "FALSE",
"CURL_DISABLE_LDAP" : "TRUE",
},
lib_source = "//:all",
out_static_libs = select({
"@bazel_tools//src/conditions:windows": [
"libcurl.lib",
],
"//conditions:default": ["libcurl.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", "-lz",
],
}),
visibility = ["//visibility:public"],
)