• 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("//build/ohos/ndk/ndk.gni")
16
17ohos_ndk_headers("web_header") {
18  dest_dir = "$ndk_headers_out_dir/web/"
19  sources = [
20    "arkweb_interface.h",
21    "arkweb_type.h",
22    "native_interface_arkweb.h",
23  ]
24}
25
26ohos_ndk_library("libohweb") {
27  cflags = [ "-fstack-protector-all" ]
28  min_compact_version = "11"
29  ndk_description_file = "./libohweb.ndk.json"
30  system_capability = "SystemCapability.Web.Webview.Core"
31  output_name = "ohweb"
32}
33
34ohos_shared_library("ohweb") {
35  if (target_cpu == "arm64") {
36    branch_protector_ret = "pac_ret"
37  }
38
39  output_extension = "so"
40  include_dirs = [
41    "${target_gen_dir}/../../ohos_nweb/include",
42    "../../ohos_nweb/include",
43  ]
44
45  sources = [
46    "arkweb_interface.cpp",
47    "arkweb_scheme_handler.cpp",
48    "native_arkweb_utils.cpp",
49    "native_interface_arkweb.cpp",
50    "native_javascript_execute_callback.cpp",
51  ]
52
53  external_deps = [
54    "c_utils:utils",
55    "hilog:libhilog",
56    "init:libbegetutil",
57    "napi:ace_napi",
58    "ability_runtime:ability_connect_callback_stub",
59    "eventhandler:libeventhandler",
60  ]
61
62  deps = [
63    "../../arkweb_utils:libarkweb_utils",
64    "../../ohos_nweb:libnweb",
65  ]
66  relative_install_dir = "ndk"
67  part_name = "webview"
68  subsystem_name = "web"
69}
70
71group("webview_ndk") {
72  deps = [
73    ":libohweb",
74    ":ohweb",
75  ]
76}
77