• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023-2023 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("//arkcompiler/ets_frontend/es2panda/es2abc_config.gni")
15import("//build/ohos.gni")
16
17es2abc_gen_abc("gen_extension_window_abc") {
18  src_js = rebase_path("extension_window.js")
19  dst_file = rebase_path(target_out_dir + "/extension_window.abc")
20  in_puts = [ "extension_window.js" ]
21  out_puts = [ target_out_dir + "/extension_window.abc" ]
22  extra_args = [ "--module" ]
23}
24
25gen_js_obj("extension_window_js") {
26  input = "extension_window.js"
27  output = target_out_dir + "/extension_window.o"
28}
29
30gen_js_obj("extension_window_abc") {
31  input = get_label_info(":gen_extension_window_abc", "target_out_dir") +
32          "/extension_window.abc"
33  output = target_out_dir + "/extension_window_abc.o"
34  dep = ":gen_extension_window_abc"
35}
36
37ohos_shared_library("extensionwindow") {
38  branch_protector_ret = "pac_ret"
39  sanitize = {
40    cfi = true
41    cfi_cross_dso = true
42    debug = false
43  }
44  sources = [ "extension_window_module.cpp" ]
45
46  configs = [ "../../../../resources/config/build:coverage_flags" ]
47
48  deps = [
49    ":extension_window_abc",
50    ":extension_window_js",
51  ]
52
53  external_deps = [ "napi:ace_napi" ]
54
55  relative_install_dir = "module/application"
56  part_name = "window_manager"
57  subsystem_name = "window"
58}
59
60config("extension_window_kit_config") {
61  visibility = [ ":*" ]
62
63  include_dirs = [
64    "../window_runtime/window_napi",
65    "../../../innerkits/wm",
66    "../../../../utils/include",
67    "../../../../wm/include",
68    "../../../../wmserver/include",
69  ]
70}
71
72ohos_shared_library("extensionwindow_napi") {
73  branch_protector_ret = "pac_ret"
74  sanitize = {
75    cfi = true
76    cfi_cross_dso = true
77    debug = false
78  }
79  sources = [
80    "js_extension_window.cpp",
81    "js_extension_window_listener.cpp",
82    "js_extension_window_register_manager.cpp",
83    "js_extension_window_utils.cpp",
84  ]
85
86  configs = [
87    ":extension_window_kit_config",
88    "../../../../resources/config/build:coverage_flags",
89  ]
90
91  include_dirs = [ "extension_window" ]
92  deps = [
93    "../../../../utils:libwmutil",
94    "../../../../wm:libwm",
95    "../window_runtime:window_native_kit",
96  ]
97
98  external_deps = [
99    "ability_runtime:runtime",
100    "c_utils:utils",
101    "eventhandler:libeventhandler",
102    "hilog:libhilog",
103    "hitrace:hitrace_meter",
104    "napi:ace_napi",
105  ]
106
107  innerapi_tags = [ "platformsdk" ]
108  part_name = "window_manager"
109  subsystem_name = "window"
110}
111