• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-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("libwindow_extension_private_config") {
18  visibility = [ ":*" ]
19
20  include_dirs = [
21    "include",
22    "include/zidl",
23    "../extension_connection/include",
24    "../extension_connection/include/zidl",
25    "../../interfaces/kits/napi/window_runtime/window_napi",
26    "../../interfaces/innerkits/extension",
27    "../../interfaces/innerkits/wm",
28    "../../window_scene/interfaces/innerkits/include",
29  ]
30}
31
32## Build libwindow_extension.so
33ohos_shared_library("libwindow_extension") {
34  branch_protector_ret = "pac_ret"
35  sanitize = {
36    cfi = true
37    cfi_cross_dso = true
38    debug = false
39  }
40  sources = [
41    "../extension_connection/src/zidl/window_extension_client_proxy.cpp",
42    "src/js_window_extension.cpp",
43    "src/js_window_extension_context.cpp",
44    "src/window_extension.cpp",
45    "src/window_extension_context.cpp",
46    "src/window_extension_stub_impl.cpp",
47    "src/zidl/window_extension_stub.cpp",
48  ]
49
50  configs = [
51    ":libwindow_extension_private_config",
52    "../../resources/config/build:coverage_flags",
53  ]
54
55  deps = [
56    "../../interfaces/kits/napi/window_runtime:window_native_kit",
57    "../../window_scene/interfaces/innerkits:libwsutils",
58    "../../wm:libwm",
59  ]
60
61  external_deps = [
62    "ability_base:want",
63    "ability_runtime:ability_context_native",
64    "ability_runtime:ability_manager",
65    "ability_runtime:app_context",
66    "ability_runtime:extensionkit_native",
67    "ability_runtime:napi_common",
68    "ability_runtime:runtime",
69    "c_utils:utils",
70    "common_event_service:cesfwk_innerkits",
71    "eventhandler:libeventhandler",
72    "graphic_2d:librender_service_client",
73    "hilog:libhilog",
74    "hitrace:hitrace_meter",
75    "input:libmmi-client",
76    "ipc:ipc_single",
77    "napi:ace_napi",
78  ]
79
80  part_name = "window_manager"
81  subsystem_name = "window"
82}
83
84config("window_extension_module_private_config") {
85  visibility = [ ":*" ]
86
87  include_dirs = [
88    "include",
89    "${ability_runtime_path}/interfaces/kits/native/ability/ability_runtime",
90  ]
91}
92
93## Build libwindow_extension_module.so
94ohos_shared_library("window_extension_module") {
95  branch_protector_ret = "pac_ret"
96  sanitize = {
97    cfi = true
98    cfi_cross_dso = true
99    debug = false
100  }
101  sources = [ "src/window_extension_module_loader.cpp" ]
102
103  configs = [
104    ":window_extension_module_private_config",
105    "../../resources/config/build:coverage_flags",
106  ]
107
108  deps = [ ":libwindow_extension" ]
109
110  external_deps = [
111    "ability_runtime:abilitykit_native",
112    "common_event_service:cesfwk_innerkits",
113    "hilog:libhilog",
114    "napi:ace_napi",
115  ]
116  relative_install_dir = "extensionability/"
117  subsystem_name = "window"
118  part_name = "window_manager"
119}
120
121group("test") {
122  testonly = true
123  deps = [ "test:test" ]
124}
125