diff --git a/interfaces/native/BUILD.gn b/interfaces/native/BUILD.gn index 8cd74d3a..c8b6c449 100644 --- a/interfaces/native/BUILD.gn +++ b/interfaces/native/BUILD.gn @@ -35,26 +35,26 @@ ohos_shared_library("ace_ndk") { ] sources = [ - "$ace_root/adapter/ohos/osal/log_wrapper.cpp", "//foundation/ace/ace_engine/frameworks/core/components/xcomponent/native_interface_xcomponent_impl.cpp", "native_interface_xcomponent.cpp", ] - deps = [ - ":libace_ndk", - "//utils/native/base:utilsecurec", - ] + deps = [ "//utils/native/base:utilsecurec" ] cflags_cc = [ "-Wno-missing-braces" ] - if (is_standard_system) { + if (target_os == "ohos") { + sources += [ "$ace_root/adapter/ohos/osal/log_wrapper.cpp" ] + deps += [ ":libace_ndk" ] external_deps = [ "hiviewdfx_hilog_native:libhilog" ] - } else { - external_deps = [ "hilog:libhilog" ] + version_script = + get_label_info(":libace_ndk", "target_gen_dir") + "/" + + get_label_info(":libace_ndk", "name") + version_script_suffix + } else if (target_os == "android") { + sources += [ "$ace_root/adapter/android/osal/log_wrapper.cpp" ] + aosp_deps = [ "shared_library:liblog" ] } - version_script = get_label_info(":libace_ndk", "target_gen_dir") + "/" + - get_label_info(":libace_ndk", "name") + version_script_suffix subsystem_name = "ace" part_name = ace_engine_part }