• 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_cross_platform_build) {
18  ohos_ndk_headers("ace_header") {
19    dest_dir = "$ndk_headers_out_dir/ace/xcomponent/"
20    sources = [ "native_interface_xcomponent.h" ]
21  }
22
23  ohos_ndk_library("libace_ndk") {
24    ndk_description_file = "./libace.ndk.json"
25    min_compact_version = "7"
26    output_name = "ace_ndk"
27  }
28}
29
30ohos_shared_library("ace_ndk") {
31  include_dirs = [
32    "//foundation/arkui/ace_engine",
33    "//foundation/arkui/ace_engine/frameworks",
34    "//foundation/arkui/ace_engine/interfaces/native",
35  ]
36
37  sources = [
38    "//foundation/arkui/ace_engine/frameworks/core/components/xcomponent/native_interface_xcomponent_impl.cpp",
39    "native_interface_xcomponent.cpp",
40  ]
41
42  deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
43
44  cflags_cc = [ "-Wno-missing-braces" ]
45
46  if (target_os == "ohos") {
47    sources += [ "$ace_root/adapter/ohos/osal/log_wrapper.cpp" ]
48    deps += [ ":libace_ndk" ]
49    external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
50    version_script =
51        get_label_info(":libace_ndk", "target_gen_dir") + "/" +
52        get_label_info(":libace_ndk", "name") + version_script_suffix
53  } else if (target_os == "android") {
54    sources += [ "$ace_root/adapter/android/osal/log_wrapper.cpp" ]
55    aosp_deps = [ "shared_library:liblog" ]
56  }
57
58  subsystem_name = ace_engine_subsystem
59  part_name = ace_engine_part
60}
61
62group("ace_packages_ndk") {
63  deps = [ ":ace_ndk" ]
64}
65