@@ -78,22 +78,43 @@ def define_common_targets():
78
78
cmd = "cp $SRCS $OUT" ,
79
79
out = "pcre2/src/pcre2_chartables.c" ,
80
80
)
81
-
82
81
runtime .cxx_library (
83
82
name = "pcre2" ,
84
- srcs = glob ([
85
- "pcre2/src/*.c" ,
86
- ]) + [
83
+ srcs = [
84
+ "pcre2/src/pcre2_auto_possess.c" ,
85
+ "pcre2/src/pcre2_chkdint.c" ,
86
+ "pcre2/src/pcre2_compile.c" ,
87
+ "pcre2/src/pcre2_compile_cgroup.c" ,
88
+ "pcre2/src/pcre2_compile_class.c" ,
89
+ "pcre2/src/pcre2_config.c" ,
90
+ "pcre2/src/pcre2_context.c" ,
91
+ "pcre2/src/pcre2_convert.c" ,
92
+ "pcre2/src/pcre2_dfa_match.c" ,
93
+ "pcre2/src/pcre2_error.c" ,
94
+ "pcre2/src/pcre2_extuni.c" ,
95
+ "pcre2/src/pcre2_find_bracket.c" ,
96
+ "pcre2/src/pcre2_jit_compile.c" ,
97
+ "pcre2/src/pcre2_maketables.c" ,
98
+ "pcre2/src/pcre2_match.c" ,
99
+ "pcre2/src/pcre2_match_data.c" ,
100
+ "pcre2/src/pcre2_match_next.c" ,
101
+ "pcre2/src/pcre2_newline.c" ,
102
+ "pcre2/src/pcre2_ord2utf.c" ,
103
+ "pcre2/src/pcre2_pattern_info.c" ,
104
+ "pcre2/src/pcre2_script_run.c" ,
105
+ "pcre2/src/pcre2_serialize.c" ,
106
+ "pcre2/src/pcre2_string_utils.c" ,
107
+ "pcre2/src/pcre2_study.c" ,
108
+ "pcre2/src/pcre2_substitute.c" ,
109
+ "pcre2/src/pcre2_substring.c" ,
110
+ "pcre2/src/pcre2_tables.c" ,
111
+ "pcre2/src/pcre2_ucd.c" ,
112
+ "pcre2/src/pcre2_valid_utf.c" ,
113
+ "pcre2/src/pcre2_xclass.c" ,
87
114
":pcre2_chartables_c" ,
88
115
],
89
- exported_headers = [
90
- ":pcre2_h_generic" ,
91
- ],
92
- headers = [
93
- ":config_h_generic" ,
94
- ] + glob ([
95
- "pcre2/src/*.h" ,
96
- ]),
116
+ exported_headers = {"pcre2.h" : ":pcre2_h_generic" },
117
+ headers = {"config.h" : ":config_h_generic" },
97
118
# Preprocessor flags from https://github.com/PCRE2Project/pcre2/blob/2e03e323339ab692640626f02f8d8d6f95bff9c6/BUILD.bazel#L23.
98
119
preprocessor_flags = [
99
120
"-DHAVE_CONFIG_H" ,
@@ -107,7 +128,8 @@ def define_common_targets():
107
128
"DEFAULT" : ["-DHAVE_UNISTD_H" ],
108
129
"ovr_config//os:windows" : [],
109
130
}),
131
+ header_namespace = "" ,
110
132
_is_external_target = True ,
111
- public_include_directories = ["pcre2" ],
133
+ include_directories = ["pcre2/src " ],
112
134
visibility = ["PUBLIC" ],
113
135
)
0 commit comments