1#Copyright (c) 2021 Huawei Device Co., Ltd. 2#Licensed under the Apache License, Version 2.0 (the "License"); 3#you may not use this file except in compliance with the License. 4#You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8#Unless required by applicable law or agreed to in writing, software 9#distributed under the License is distributed on an "AS IS" BASIS, 10#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11#See the License for the specific language governing permissions and 12#limitations under the License. 13 14import("//build/lite/config/component/lite_component.gni") 15 16ace_common_root = "//foundation/ace/ace_engine_lite/frameworks/common" 17ace_interface_root = 18 "//foundation/ace/ace_engine_lite/interfaces/innerkits/builtin" 19ace_target_root = "//foundation/ace/ace_engine_lite/frameworks/targets" 20native_engine_root = "//foundation/ace/ace_engine_lite/frameworks/native_engine" 21 22lite_component("ace_native_engine_lite") { 23 features = [ ":ace_native_engine" ] 24} 25 26lite_library("ace_native_engine") { 27 if (ohos_kernel_type == "liteos_m") { 28 target_type = "static_library" 29 } else { 30 target_type = "shared_library" 31 } 32 33 include_dirs = [ 34 "$ace_common_root/log", 35 "$ace_common_root/memory", 36 "$ace_interface_root/async", 37 "$ace_interface_root/base", 38 "$ace_interface_root/jsi", 39 "//base/hiviewdfx/hilog_lite/interfaces/native/kits", 40 "//third_party/jerryscript/jerry-core/include", 41 ] 42 43 deps = [ "$ace_target_root" ] 44 45 cflags = [ "-Wall" ] 46 cflags_cc = cflags 47 48 sources = [ 49 "$native_engine_root/async/js_async_work.cpp", 50 "$native_engine_root/async/message_queue_utils.cpp", 51 "$native_engine_root/jsi/jsi.cpp", 52 ] 53 54 public_deps = [ "$ace_common_root:ace_common_lite" ] 55 56 if (ohos_kernel_type == "liteos_m") { 57 public_deps += [ 58 "//foundation/graphic/ui:ui", 59 "//third_party/jerryscript:jerry_engine", 60 ] 61 } else { 62 public_deps += [ "//third_party/jerryscript/jerry-core:jerry-core_shared" ] 63 } 64} 65