first
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library")
|
||||
|
||||
exports_files(["LICENSE"])
|
||||
|
||||
yaml_cpp_defines = select({
|
||||
# On Windows, ensure static linking is used.
|
||||
"@platforms//os:windows": ["YAML_CPP_STATIC_DEFINE", "YAML_CPP_NO_CONTRIB"],
|
||||
"//conditions:default": [],
|
||||
})
|
||||
|
||||
yaml_copts = select({
|
||||
"@platforms//os:windows": [],
|
||||
"//conditions:default": [
|
||||
"-fexceptions",
|
||||
],
|
||||
})
|
||||
|
||||
cc_library(
|
||||
name = "yaml-cpp_internal",
|
||||
visibility = ["//:__subpackages__"],
|
||||
strip_include_prefix = "src",
|
||||
hdrs = glob(["src/**/*.h"]),
|
||||
copts = yaml_copts,
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "yaml-cpp",
|
||||
visibility = ["//visibility:public"],
|
||||
includes = ["include"],
|
||||
hdrs = glob(["include/**/*.h"]),
|
||||
srcs = glob(["src/**/*.cpp", "src/**/*.h"]),
|
||||
defines = yaml_cpp_defines,
|
||||
copts = yaml_copts,
|
||||
)
|
||||
Reference in New Issue
Block a user