#Copyright (c) 2021 Huawei Device Co., Ltd. #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #Unless required by applicable law or agreed to in writing, software #distributed under the License is distributed on an "AS IS" BASIS, #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #See the License for the specific language governing permissions and #limitations under the License. import("//build/lite/config/component/lite_component.gni") ace_common_root = "//foundation/arkui/ace_engine_lite/frameworks/common" ace_interface_root = "//foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin" ace_target_root = "//foundation/arkui/ace_engine_lite/frameworks/targets" native_engine_root = "//foundation/arkui/ace_engine_lite/frameworks/native_engine" lite_component("ace_native_engine_lite") { features = [ ":ace_native_engine" ] } lite_library("ace_native_engine") { if (ohos_kernel_type == "liteos_m") { target_type = "static_library" if (defined(board_toolchain_type) && board_toolchain_type == "iccarm") { cflags = [ "--diag_suppress", "Pa137,Pe226", ] cflags_cc = cflags } } else { target_type = "shared_library" } include_dirs = [ "$ace_common_root/log", "$ace_common_root/memory", "$ace_interface_root/async", "$ace_interface_root/base", "$ace_interface_root/jsi", "//base/hiviewdfx/hilog_lite/interfaces/native/kits", "//third_party/jerryscript/jerry-core/include", "//foundation/arkui/ace_engine_lite/frameworks/include/base", "//foundation/ability/ability_lite/interfaces/kits/ability_lite/slite", "//foundation/ability/ability_lite/interfaces/kits/want_lite", "//foundation/bundlemanager/bundle_framework_lite/interfaces/kits/bundle_lite", ] deps = [ "$ace_target_root" ] sources = [ "$native_engine_root/async/js_async_work.cpp", "$native_engine_root/async/message_queue_utils.cpp", "$native_engine_root/jsi/jsi.cpp", ] public_deps = [ "$ace_common_root:ace_common_lite" ] if (ohos_kernel_type == "liteos_m") { public_deps += [ "//foundation/arkui/ui_lite:ui", "//third_party/jerryscript:jerry_engine", ] } else { public_deps += [ "//third_party/jerryscript/jerry-core:jerry-core_shared" ] } }