diff --git a/BUILD.gn b/BUILD.gn index e43b3cd1cd73fee0a39bdfd845b0bd6eee665567..2ac802e876825e03cc86f8e99bdd28016e3d4c52 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -40,19 +40,24 @@ if (defined(ohos_lite)) { } } else { import("//build/ohos.gni") - config("cJSON_config") { + config("cjson_config") { include_dirs = [ "." ] defines = [ "CJSON_NESTING_LIMIT=(128)" ] } ohos_static_library("cjson_static") { sources = [ "cJSON.c" ] - public_configs = [ ":cJSON_config" ] + public_configs = [ ":cjson_config" ] + part_name = "cJSON" + subsystem_name = "thirdparty" + } + ohos_shared_library("cJSON_config") { + public_configs = [ ":cjson_config" ] part_name = "cJSON" subsystem_name = "thirdparty" } ohos_shared_library("cjson") { sources = [ "cJSON.c" ] - public_configs = [ ":cJSON_config" ] + public_configs = [ ":cjson_config" ] innerapi_tags = [ "chipsetsdk", "platformsdk_indirect", diff --git a/bundle.json b/bundle.json index 3b2fb2a165da5650916e5e496c8599868324a919..0b998773824f6a5859818e32a53bb4fa385c5bd6 100644 --- a/bundle.json +++ b/bundle.json @@ -27,7 +27,26 @@ }, "build": { "sub_component": [], - "inner_kits": [], + "inner_kits": [ + { + "name": "//third_party/cJSON:cjson", + "header": { + "header_files": [ + "cJSON.h" + ], + "header_base": "//third_party/cJSON" + } + }, + { + "name": "//third_party/cJSON:cJSON_config", + "header": { + "header_files": [ + "cJSON.h" + ], + "header_base": "//third_party/cJSON" + } + } + ], "test": [] } }