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    "../common:wm_napi_util",
78  ]
79
80  external_deps = [
81    "ability_runtime:ability_manager",
82    "ability_runtime:dialog_request_info",
83    "ability_runtime:extensionkit_native",
84    "ability_runtime:runtime",
85    "access_token:libaccesstoken_sdk",
86    "ace_engine:ace_uicontent",
87    "bundle_framework:appexecfwk_base",
88    "c_utils:utils",
89    "eventhandler:libeventhandler",
90    "hilog:libhilog",
91    "hitrace:hitrace_meter",
92    "image_framework:image",
93    "image_framework:image_native",
94    "ipc:ipc_napi",
95    "ipc:ipc_single",
96    "napi:ace_napi",
97  ]
98
99  innerapi_tags = [ "platformsdk" ]
100  part_name = "window_manager"
101  subsystem_name = "window"
102
103  defines = []
104  if (build_variant == "user") {
105    defines += [ "IS_RELEASE_VERSION" ]
106  }
107}
108
109ohos_shared_library("window_napi") {
110  branch_protector_ret = "pac_ret"
111  sanitize = {
112    cfi = true
113    cfi_cross_dso = true
114    cfi_vcall_icall_only = true
115    debug = false
116  }
117  sources = [
118    "window_manager_napi/js_window_manager.cpp",
119    "window_manager_napi/window_manager_module.cpp",
120  ]
121
122  configs = [
123    ":window_manager_napi_config",
124    "../../../../resources/config/build:coverage_flags",
125  ]
126
127  deps = [
128    ":window_native_kit",
129    "../../../../dm:libdm",
130    "../../../../utils:libwmutil",
131    "../../../../utils:libwmutil_base",
132    "../../../../wm:libwm",
133    "../common:wm_napi_util",
134  ]
135
136  external_deps = [
137    "ability_runtime:ability_context_native",
138    "ability_runtime:abilitykit_native",
139    "ability_runtime:runtime",
140    "c_utils:utils",
141    "common_event_service:cesfwk_innerkits",
142    "graphic_2d:librender_service_client",
143    "hilog:libhilog",
144    "hitrace:hitrace_meter",
145    "image_framework:image",
146    "napi:ace_napi",
147  ]
148
149  relative_install_dir = "module"
150
151  part_name = "window_manager"
152  subsystem_name = "window"
153}
154
155ohos_shared_library("windowstage_kit") {
156  branch_protector_ret = "pac_ret"
157  sanitize = {
158    cfi = true
159    cfi_cross_dso = true
160    cfi_vcall_icall_only = true
161    debug = false
162  }
163  sources = [ "window_stage_napi/js_window_stage.cpp" ]
164
165  configs = [
166    ":window_native_kit_config",
167    "../../../../resources/config/build:coverage_flags",
168  ]
169
170  include_dirs = [ "window_stage_napi" ]
171  deps = [
172    ":window_native_kit",
173    "../../../../utils:libwmutil",
174    "../../../../utils:libwmutil_base",
175    "../../../../wm:libwm",
176    "../common:wm_napi_util",
177  ]
178
179  external_deps = [
180    "ability_runtime:runtime",
181    "c_utils:utils",
182    "hilog:libhilog",
183    "napi:ace_napi",
184  ]
185
186  innerapi_tags = [ "platformsdk" ]
187  part_name = "window_manager"
188  subsystem_name = "window"
189}
190