diff --git a/BUILD.gn b/BUILD.gn index c41223a8780b4ffce90cdd4632c29c2851cbf305..9e57f78cb0087260d1659bb98a961af03913ecec 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -16,6 +16,10 @@ import("//build/ohos.gni") PCRE2_LIB_DIR = "//third_party/pcre2/pcre2" +config("third_party_pcre2_config") { + include_dirs = [ "$PCRE2_LIB_DIR/src" ] +} + ohos_shared_library("libpcre2") { md5_check_script = rebase_path("$PCRE2_LIB_DIR/check_md5.sh") _arguments_config = [ @@ -96,6 +100,7 @@ ohos_shared_library("libpcre2") { "$PCRE2_LIB_DIR/src/pcre2_xclass.c", ] include_dirs = [ "$PCRE2_LIB_DIR/src" ] + public_configs = [ ":third_party_pcre2_config" ] cflags = [ "-D_GNU_SOURCE", "-DHAVE_CONFIG_H", diff --git a/bundle.json b/bundle.json index c935fa8d3124eb7e55175d4b245d00fddf3385aa..22f53215e9856320156e0e735c136752769f840b 100644 --- a/bundle.json +++ b/bundle.json @@ -24,7 +24,24 @@ }, "build": { "sub_component": [], - "inner_kits": [], + "inner_kits": [ + { + "name": "//third_party/pcre2:libpcre2", + "header": { + "header_files": [ + "pcre2_internal.h", + "pcre2_intmodedep.h", + "pcre2_jit_neon_inc.h", + "pcre2_jit_simd_inc.h", + "pcre2_ucp.h", + "pcre2posix.h", + "pcre2.h", + "config.h" + ], + "header_base": "//third_party/pcre2/pcre2/src" + } + } + ], "test": [] } }