"""pcre is only expected to be used on Linux systems""" load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") package(default_visibility = ["//visibility:public"]) filegroup( name = "all_srcs", srcs = glob( include = ["**"], exclude = ["*.bazel"], ), ) cmake( name = "pcre", cache_entries = { "CMAKE_C_FLAGS": "$${CMAKE_C_FLAGS:-} -fPIC", }, lib_source = ":all_srcs", out_static_libs = select({ "@platforms//os:windows": ["pcre2-8.lib"], "//conditions:default": ["libpcre2-8.a"], }), ) filegroup( name = "pcre_dir", srcs = [ ":pcre", ], output_group = "gen_dir", )