BUILD.bazel 574 Bytes
Newer Older
1
2
3
4
5
6
yaml_cpp_defines = select({
    # On Windows, ensure static linking is used.
    "@platforms//os:windows": ["YAML_CPP_STATIC_DEFINE", "YAML_CPP_NO_CONTRIB"],
    "//conditions:default": [],
})

Ezekiel Warren's avatar
Ezekiel Warren committed
7
8
9
10
11
12
13
14
15
16
cc_library(
    name = "yaml-cpp_internal",
    visibility = ["//:__subpackages__"],
    strip_include_prefix = "src",
    hdrs = glob(["src/**/*.h"]),
)

cc_library(
    name = "yaml-cpp",
    visibility = ["//visibility:public"],
17
    includes = ["include"],
Ezekiel Warren's avatar
Ezekiel Warren committed
18
19
    hdrs = glob(["include/**/*.h"]),
    srcs = glob(["src/**/*.cpp", "src/**/*.h"]),
20
    defines = yaml_cpp_defines,
Ezekiel Warren's avatar
Ezekiel Warren committed
21
)