• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/arkui/ace_engine_lite/frameworks/common"
17ace_interface_root =
18    "//foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin"
19ace_target_root = "//foundation/arkui/ace_engine_lite/frameworks/targets"
20native_engine_root =
21    "//foundation/arkui/ace_engine_lite/frameworks/native_engine"
22
23lite_component("ace_native_engine_lite") {
24  features = [ ":ace_native_engine" ]
25}
26
27lite_library("ace_native_engine") {
28  if (ohos_kernel_type == "liteos_m") {
29    target_type = "static_library"
30    if (defined(board_toolchain_type) && board_toolchain_type == "iccarm") {
31      cflags = [
32        "--diag_suppress",
33        "Pa137,Pe226",
34      ]
35      cflags_cc = cflags
36    }
37  } else {
38    target_type = "shared_library"
39  }
40
41  include_dirs = [
42    "$ace_common_root/log",
43    "$ace_common_root/memory",
44    "$ace_interface_root/async",
45    "$ace_interface_root/base",
46    "$ace_interface_root/jsi",
47    "//base/hiviewdfx/hilog_lite/interfaces/native/kits",
48    "//third_party/jerryscript/jerry-core/include",
49    "//foundation/arkui/ace_engine_lite/frameworks/include/base",
50  ]
51
52  deps = [ "$ace_target_root" ]
53
54  sources = [
55    "$native_engine_root/async/js_async_work.cpp",
56    "$native_engine_root/async/message_queue_utils.cpp",
57    "$native_engine_root/jsi/jsi.cpp",
58  ]
59
60  public_deps = [ "$ace_common_root:ace_common_lite" ]
61
62  if (ohos_kernel_type == "liteos_m") {
63    public_deps += [
64      "//foundation/graphic/ui:ui",
65      "//third_party/jerryscript:jerry_engine",
66    ]
67  } else {
68    public_deps += [ "//third_party/jerryscript/jerry-core:jerry-core_shared" ]
69  }
70}
71