• 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 = [ "../../ohos_nweb/include" ]
41
42  sources = [
43    "arkweb_interface.cpp",
44    "arkweb_scheme_handler.cpp",
45    "native_arkweb_utils.cpp",
46    "native_interface_arkweb.cpp",
47    "native_javascript_execute_callback.cpp",
48  ]
49
50  external_deps = [
51    "c_utils:utils",
52    "hilog:libhilog",
53    "napi:ace_napi",
54  ]
55
56  deps = [ "../../ohos_nweb:libnweb" ]
57  relative_install_dir = "ndk"
58  part_name = "webview"
59  subsystem_name = "web"
60}
61
62group("webview_ndk") {
63  deps = [
64    ":libohweb",
65    ":ohweb",
66  ]
67}
68