• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 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/ohos.gni")
15import("//foundation/arkui/ace_engine/ace_config.gni")
16
17if (!is_arkui_x) {
18  ohos_ndk_headers("ace_header") {
19    dest_dir = "$ndk_headers_out_dir/ace/xcomponent/"
20    sources = [
21      "native_interface_xcomponent.h",
22      "native_xcomponent_key_event.h",
23    ]
24  }
25
26  ohos_ndk_library("libace_ndk") {
27    ndk_description_file = "./libace.ndk.json"
28    min_compact_version = "7"
29    output_name = "ace_ndk"
30  }
31}
32
33ohos_shared_library("ace_ndk") {
34  if (current_os == "ohos") {
35    sanitize = {
36      integer_overflow = true
37      boundary_sanitize = true
38      debug = ace_sanitize_debug
39    }
40  }
41  include_dirs = [
42    "//foundation/arkui/ace_engine",
43    "//foundation/arkui/ace_engine/frameworks",
44    "//foundation/arkui/ace_engine/interfaces/native",
45  ]
46
47  sources = [
48    "//foundation/arkui/ace_engine/frameworks/core/components/common/properties/color.cpp",
49    "//foundation/arkui/ace_engine/frameworks/core/components/xcomponent/native_interface_xcomponent_impl.cpp",
50    "native_interface_xcomponent.cpp",
51    "node/event_converter.cpp",
52    "node/native_impl.cpp",
53    "node/node_model.cpp",
54    "node/style_modifier.cpp",
55  ]
56
57  deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
58
59  cflags_cc = [ "-Wno-missing-braces" ]
60
61  if (target_os == "ohos") {
62    sources += [ "$ace_root/adapter/ohos/osal/log_wrapper.cpp" ]
63    deps += [ ":libace_ndk" ]
64    external_deps = [ "hilog:libhilog" ]
65    version_script =
66        get_label_info(":libace_ndk", "target_gen_dir") + "/" +
67        get_label_info(":libace_ndk", "name") + version_script_suffix
68  } else if (target_os == "android") {
69    sources += [ "$ace_root/adapter/android/osal/log_wrapper.cpp" ]
70    libs = [ "log" ]
71  }
72
73  subsystem_name = ace_engine_subsystem
74  part_name = ace_engine_part
75}
76
77group("ace_packages_ndk") {
78  deps = [ ":ace_ndk" ]
79}
80