1# Copyright (c) 2021-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("//build/ohos.gni")
15import("../../../../windowmanager_aafwk.gni")
16
17config("window_manager_napi_config") {
18  visibility = [ ":*" ]
19
20  include_dirs = [
21    "window_napi",
22    "window_manager_napi",
23    "../../../innerkits/wm",
24    "../../../innerkits/dm",
25    "../../../../wm/include",
26    "../../../../utils/include",
27  ]
28}
29
30config("window_native_kit_config") {
31  visibility = [ ":*" ]
32
33  include_dirs = [
34    "window_napi",
35    "../../../innerkits/wm",
36    "../../../innerkits/dm",
37    "../../../../utils/include",
38    "../../../../wm/include",
39    "../../../../wmserver/include",
40  ]
41}
42
43config("window_native_kit_public_config") {
44  visibility = [ ":*" ]
45
46  include_dirs = [ "window_napi" ]
47}
48
49ohos_shared_library("window_native_kit") {
50  branch_protector_ret = "pac_ret"
51  sanitize = {
52    cfi = true
53    cfi_cross_dso = true
54    cfi_vcall_icall_only = true
55    debug = false
56  }
57  sources = [
58    "window_napi/js_extension_window_config.cpp",
59    "window_napi/js_transition_controller.cpp",
60    "window_napi/js_window.cpp",
61    "window_napi/js_window_listener.cpp",
62    "window_napi/js_window_register_manager.cpp",
63    "window_napi/js_window_utils.cpp",
64  ]
65
66  public_configs = [ ":window_native_kit_public_config" ]
67
68  configs = [
69    ":window_native_kit_config",
70    "../../../../resources/config/build:coverage_flags",
71  ]
72
73  deps = [
74    "../../../../utils:libwmutil",
75    "../../../../utils:libwmutil_base",
76    "../../../../wm:libwm",
77  ]
78
79  external_deps = [
80    "ability_runtime:ability_manager",
81    "ability_runtime:dialog_request_info",
82    "ability_runtime:extensionkit_native",
83    "ability_runtime:runtime",
84    "access_token:libaccesstoken_sdk",
85    "ace_engine:ace_uicontent",
86    "bundle_framework:appexecfwk_base",
87    "c_utils:utils",
88    "eventhandler:libeventhandler",
89    "hilog:libhilog",
90    "hitrace:hitrace_meter",
91    "image_framework:image",
92    "image_framework:image_native",
93    "ipc:ipc_napi",
94    "ipc:ipc_single",
95    "napi:ace_napi",
96  ]
97
98  innerapi_tags = [ "platformsdk" ]
99  part_name = "window_manager"
100  subsystem_name = "window"
101
102  defines = []
103  if (build_variant == "user") {
104    defines += [ "IS_RELEASE_VERSION" ]
105  }
106}
107
108ohos_shared_library("window_napi") {
109  branch_protector_ret = "pac_ret"
110  sanitize = {
111    cfi = true
112    cfi_cross_dso = true
113    cfi_vcall_icall_only = true
114    debug = false
115  }
116  sources = [
117    "window_manager_napi/js_window_manager.cpp",
118    "window_manager_napi/window_manager_module.cpp",
119  ]
120
121  configs = [
122    ":window_manager_napi_config",
123    "../../../../resources/config/build:coverage_flags",
124  ]
125
126  deps = [
127    ":window_native_kit",
128    "../../../../dm:libdm",
129    "../../../../utils:libwmutil",
130    "../../../../utils:libwmutil_base",
131    "../../../../wm:libwm",
132  ]
133
134  external_deps = [
135    "ability_runtime:ability_context_native",
136    "ability_runtime:abilitykit_native",
137    "ability_runtime:runtime",
138    "c_utils:utils",
139    "common_event_service:cesfwk_innerkits",
140    "graphic_2d:librender_service_client",
141    "hilog:libhilog",
142    "hitrace:hitrace_meter",
143    "image_framework:image",
144    "napi:ace_napi",
145  ]
146
147  relative_install_dir = "module"
148
149  part_name = "window_manager"
150  subsystem_name = "window"
151}
152
153ohos_shared_library("windowstage_kit") {
154  branch_protector_ret = "pac_ret"
155  sanitize = {
156    cfi = true
157    cfi_cross_dso = true
158    cfi_vcall_icall_only = true
159    debug = false
160  }
161  sources = [ "window_stage_napi/js_window_stage.cpp" ]
162
163  configs = [
164    ":window_native_kit_config",
165    "../../../../resources/config/build:coverage_flags",
166  ]
167
168  include_dirs = [ "window_stage_napi" ]
169  deps = [
170    ":window_native_kit",
171    "../../../../utils:libwmutil",
172    "../../../../utils:libwmutil_base",
173    "../../../../wm:libwm",
174  ]
175
176  external_deps = [
177    "ability_runtime:runtime",
178    "c_utils:utils",
179    "hilog:libhilog",
180    "napi:ace_napi",
181  ]
182
183  innerapi_tags = [ "platformsdk" ]
184  part_name = "window_manager"
185  subsystem_name = "window"
186}
187