diff --git a/bundle.json b/bundle.json index e557a77306830eb14d4f859df1971b047b97dd17..8520f417edc074a0bd53c7dccd8b05cf71fe0a2c 100644 --- a/bundle.json +++ b/bundle.json @@ -68,6 +68,15 @@ ], "header_base": "//foundation/filemanagement/file_api/utils/filemgmt_libn/include" } + }, + { + "name": "//foundation/filemanagement/file_api/utils/filemgmt_libhilog:filemgmt_libhilog", + "header": { + "header_files": [ + "filemgmt_libhilog.h" + ], + "header_base": "//foundation/filemanagement/file_api/utils/filemgmt_libhilog" + } } ], "test": [ diff --git a/interfaces/kits/js/BUILD.gn b/interfaces/kits/js/BUILD.gn index b13c97dba78f5946b8518093e4db6ccd5f967012..9c3d85f342e3fa53da8d1f0cdc3cd77d5e449609 100644 --- a/interfaces/kits/js/BUILD.gn +++ b/interfaces/kits/js/BUILD.gn @@ -90,13 +90,15 @@ ohos_shared_library("fileio") { ] deps = [ - "${arkui_napi_path}:ace_napi", "${file_api_path}/interfaces/kits/native:remote_uri_native", "//third_party/bounds_checking_function:libsec_shared", "//third_party/openssl:libcrypto_shared", ] - external_deps = [ "hilog:libhilog" ] + external_deps = [ + "hilog:libhilog", + "napi:ace_napi", + ] defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ] } @@ -135,7 +137,10 @@ ohos_shared_library("fs") { cflags_cc = [ "-std=c++17" ] - deps = [ "${utils_path}/filemgmt_libn:filemgmt_libn" ] + deps = [ + "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", + "${utils_path}/filemgmt_libn:filemgmt_libn", + ] use_exceptions = true @@ -177,6 +182,17 @@ ohos_shared_library("fs") { ] deps += [ "${file_api_path}/interfaces/kits/native:remote_uri_native" ] } + + label_hilog = "hilog:libhilog" + if (use_mac) { + label_hilog = "hilog:libhilog_mac" + } else if (use_mingw_win) { + label_hilog = "hilog:libhilog_windows" + } + external_deps += [ + "napi:ace_napi", + label_hilog, + ] } ohos_shared_library("hash") { @@ -195,10 +211,21 @@ ohos_shared_library("hash") { ] deps = [ + "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", "${utils_path}/filemgmt_libn:filemgmt_libn", "//third_party/bounds_checking_function:libsec_shared", "//third_party/openssl:libcrypto_shared", ] + label_hilog = "hilog:libhilog" + if (use_mac) { + label_hilog = "hilog:libhilog_mac" + } else if (use_mingw_win) { + label_hilog = "hilog:libhilog_windows" + } + external_deps = [ + "napi:ace_napi", + label_hilog, + ] defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ] } @@ -225,16 +252,14 @@ ohos_shared_library("file") { "src/mod_file/module.cpp", ] - deps = [ - "${arkui_napi_path}:ace_napi", - "//third_party/bounds_checking_function:libsec_shared", - ] + deps = [ "//third_party/bounds_checking_function:libsec_shared" ] external_deps = [ "ability_runtime:abilitykit_native", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "hilog:libhilog", + "napi:ace_napi", ] } @@ -249,7 +274,21 @@ ohos_shared_library("statfs") { "src/mod_statfs/statfs_napi.cpp", ] - deps = [ "${utils_path}/filemgmt_libn:filemgmt_libn" ] + deps = [ + "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", + "${utils_path}/filemgmt_libn:filemgmt_libn", + ] + + label_hilog = "hilog:libhilog" + if (use_mac) { + label_hilog = "hilog:libhilog_mac" + } else if (use_mingw_win) { + label_hilog = "hilog:libhilog_windows" + } + external_deps = [ + "napi:ace_napi", + label_hilog, + ] } ohos_shared_library("statvfs") { @@ -263,7 +302,21 @@ ohos_shared_library("statvfs") { "src/mod_statvfs/statvfs_napi.cpp", ] - deps = [ "${utils_path}/filemgmt_libn:filemgmt_libn" ] + deps = [ + "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", + "${utils_path}/filemgmt_libn:filemgmt_libn", + ] + + label_hilog = "hilog:libhilog" + if (use_mac) { + label_hilog = "hilog:libhilog_mac" + } else if (use_mingw_win) { + label_hilog = "hilog:libhilog_windows" + } + external_deps = [ + "napi:ace_napi", + label_hilog, + ] } ohos_shared_library("environment") { @@ -277,11 +330,23 @@ ohos_shared_library("environment") { "src/mod_environment/environment_napi.cpp", ] - deps = [ "${utils_path}/filemgmt_libn:filemgmt_libn" ] + deps = [ + "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", + "${utils_path}/filemgmt_libn:filemgmt_libn", + ] + + label_hilog = "hilog:libhilog" + if (use_mac) { + label_hilog = "hilog:libhilog_mac" + } else if (use_mingw_win) { + label_hilog = "hilog:libhilog_windows" + } external_deps = [ "access_token:libtokenid_sdk", "ipc:ipc_core", + "napi:ace_napi", + label_hilog, ] } @@ -298,7 +363,24 @@ ohos_shared_library("securitylabel") { "src/mod_securitylabel/securitylabel_napi.cpp", ] - deps = [ "${utils_path}/filemgmt_libn:filemgmt_libn" ] + deps = [ + "${utils_path}/filemgmt_libhilog:filemgmt_libhilog", + "${utils_path}/filemgmt_libn:filemgmt_libn", + ] + + label_hilog = "hilog:libhilog" + if (use_mac) { + label_hilog = "hilog:libhilog_mac" + } else if (use_mingw_win) { + label_hilog = "hilog:libhilog_windows" + } + + external_deps = [ + "access_token:libtokenid_sdk", + "ipc:ipc_core", + "napi:ace_napi", + label_hilog, + ] } ohos_shared_library("document") { @@ -324,9 +406,17 @@ ohos_shared_library("document") { "src/mod_document/document_napi.cpp", ] - deps = [ "${arkui_napi_path}:ace_napi" ] + label_hilog = "hilog:libhilog" + if (use_mac) { + label_hilog = "hilog:libhilog_mac" + } else if (use_mingw_win) { + label_hilog = "hilog:libhilog_windows" + } - external_deps = [ "hilog:libhilog" ] + external_deps = [ + "napi:ace_napi", + label_hilog, + ] } group("build_kits_js") { diff --git a/utils/filemgmt_libhilog/BUILD.gn b/utils/filemgmt_libhilog/BUILD.gn index 8d0e5f9b0aed602acea087bc6ea7528abb36fd19..8af3a5b26bf91572d58b67c25828e41e441e97df 100644 --- a/utils/filemgmt_libhilog/BUILD.gn +++ b/utils/filemgmt_libhilog/BUILD.gn @@ -14,13 +14,11 @@ import("//build/ohos.gni") import("//foundation/filemanagement/file_api/file_api.gni") -label_hilog = "${hiviewdfx_hilog_path}/interfaces/native/innerkits:libhilog" +label_hilog = "hilog:libhilog" if (use_mac) { - label_hilog = - "${hiviewdfx_hilog_path}/interfaces/native/innerkits:libhilog_mac" + label_hilog = "hilog:libhilog_mac" } else if (use_mingw_win) { - label_hilog = - "${hiviewdfx_hilog_path}/interfaces/native/innerkits:libhilog_windows" + label_hilog = "hilog:libhilog_windows" } config("log_public_config") { @@ -31,7 +29,7 @@ config("log_public_config") { ohos_shared_library("filemgmt_libhilog") { public_configs = [ ":log_public_config" ] - public_deps = [ label_hilog ] + external_deps = [ label_hilog ] subsystem_name = "filemanagement" innerapi_tags = [ "platformsdk" ] diff --git a/utils/filemgmt_libn/BUILD.gn b/utils/filemgmt_libn/BUILD.gn index c1a019973c5756eaf6288017de43baa01c6ee039..44ee3d60c072304e725ae1b764164485418545fc 100644 --- a/utils/filemgmt_libn/BUILD.gn +++ b/utils/filemgmt_libn/BUILD.gn @@ -44,9 +44,19 @@ ohos_shared_library("filemgmt_libn") { } public_configs = [ ":libn_public_config" ] - public_deps = [ - "${arkui_napi_path}:ace_napi", - "${file_api_path}/utils/filemgmt_libhilog", + + deps = [ "${utils_path}/filemgmt_libhilog:filemgmt_libhilog" ] + + label_hilog = "hilog:libhilog" + if (use_mac) { + label_hilog = "hilog:libhilog_mac" + } else if (use_mingw_win) { + label_hilog = "hilog:libhilog_windows" + } + + external_deps = [ + "napi:ace_napi", + label_hilog, ] use_exceptions = true