2021-02-26 20:21:13 +00:00
|
|
|
"""pcre is only expected to be used on Linux systems"""
|
|
|
|
|
2021-03-12 16:54:14 +00:00
|
|
|
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")
|
2021-02-26 20:21:13 +00:00
|
|
|
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
|
|
|
filegroup(
|
|
|
|
name = "all_srcs",
|
2021-12-30 16:37:31 +00:00
|
|
|
srcs = glob(
|
|
|
|
include = ["**"],
|
|
|
|
exclude = ["*.bazel"],
|
|
|
|
),
|
2021-02-26 20:21:13 +00:00
|
|
|
)
|
|
|
|
|
2021-03-09 18:55:01 +00:00
|
|
|
cmake(
|
2021-02-26 20:21:13 +00:00
|
|
|
name = "pcre",
|
|
|
|
cache_entries = {
|
2024-09-05 13:58:37 +00:00
|
|
|
"CMAKE_C_FLAGS": "$${CMAKE_C_FLAGS:-} -fPIC",
|
2021-02-26 20:21:13 +00:00
|
|
|
},
|
|
|
|
lib_source = ":all_srcs",
|
2023-06-09 10:29:12 +00:00
|
|
|
out_static_libs = select({
|
|
|
|
"@platforms//os:windows": ["pcre2-8.lib"],
|
|
|
|
"//conditions:default": ["libpcre2-8.a"],
|
|
|
|
}),
|
2021-02-26 20:21:13 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
filegroup(
|
|
|
|
name = "pcre_dir",
|
|
|
|
srcs = [
|
|
|
|
":pcre",
|
|
|
|
],
|
|
|
|
output_group = "gen_dir",
|
|
|
|
)
|