summaryrefslogtreecommitdiffstats
path: root/src/jaegertracing/opentelemetry-cpp/bazel/curl.BUILD
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
commite6918187568dbd01842d8d1d2c808ce16a894239 (patch)
tree64f88b554b444a49f656b6c656111a145cbbaa28 /src/jaegertracing/opentelemetry-cpp/bazel/curl.BUILD
parentInitial commit. (diff)
downloadceph-b26c4052f3542036551aa9dec9caa4226e456195.tar.xz
ceph-b26c4052f3542036551aa9dec9caa4226e456195.zip
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/jaegertracing/opentelemetry-cpp/bazel/curl.BUILD')
-rw-r--r--src/jaegertracing/opentelemetry-cpp/bazel/curl.BUILD56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/jaegertracing/opentelemetry-cpp/bazel/curl.BUILD b/src/jaegertracing/opentelemetry-cpp/bazel/curl.BUILD
new file mode 100644
index 000000000..2c668b895
--- /dev/null
+++ b/src/jaegertracing/opentelemetry-cpp/bazel/curl.BUILD
@@ -0,0 +1,56 @@
+# Builds CURL from a distribution.
+
+load("@io_opentelemetry_cpp//bazel:curl.bzl", "CURL_COPTS")
+
+package(features = ["no_copts_tokenization"])
+
+config_setting(
+ name = "windows",
+ constraint_values = [
+ "@bazel_tools//platforms:windows",
+ ],
+ visibility = ["//visibility:private"],
+)
+
+config_setting(
+ name = "osx",
+ constraint_values = [
+ "@bazel_tools//platforms:osx",
+ ],
+ visibility = ["//visibility:private"],
+)
+
+cc_library(
+ name = "curl",
+ srcs = glob([
+ "lib/**/*.c",
+ ]),
+ hdrs = glob([
+ "include/curl/*.h",
+ "lib/**/*.h",
+ ]),
+ copts = CURL_COPTS + [
+ "-DOS=\"os\"",
+ ],
+ defines = ["CURL_STATICLIB"],
+ includes = [
+ "include/",
+ "lib/",
+ ],
+ linkopts = select({
+ "//:windows": [
+ "-DEFAULTLIB:ws2_32.lib",
+ "-DEFAULTLIB:advapi32.lib",
+ "-DEFAULTLIB:crypt32.lib",
+ "-DEFAULTLIB:Normaliz.lib",
+ ],
+ "//:osx": [
+ "-framework SystemConfiguration",
+ "-lpthread",
+ ],
+ "//conditions:default": [
+ "-lpthread",
+ ],
+ }),
+ visibility = ["//visibility:public"],
+)