• 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    cfi_vcall_icall_only = true
39    debug = false
40  }
41  sources = [
42    "../extension_connection/src/zidl/window_extension_client_proxy.cpp",
43    "src/js_window_extension.cpp",
44    "src/js_window_extension_context.cpp",
45    "src/window_extension.cpp",
46    "src/window_extension_context.cpp",
47    "src/window_extension_stub_impl.cpp",
48    "src/zidl/window_extension_stub.cpp",
49  ]
50
51  configs = [
52    ":libwindow_extension_private_config",
53    "../../resources/config/build:coverage_flags",
54  ]
55
56  deps = [
57    "${window_base_path}/utils:libwmutil",
58    "../../interfaces/kits/napi/window_runtime:window_native_kit",
59    "../../utils:libwmutil_base",
60    "../../window_scene/interfaces/innerkits:libwsutils",
61    "../../wm:libwm",
62  ]
63
64  external_deps = [
65    "ability_base:want",
66    "ability_runtime:ability_connect_callback_stub",
67    "ability_runtime:ability_context_native",
68    "ability_runtime:ability_manager",
69    "ability_runtime:ability_start_options",
70    "ability_runtime:app_context",
71    "ability_runtime:extensionkit_native",
72    "ability_runtime:napi_common",
73    "ability_runtime:runtime",
74    "ability_runtime:wantagent_innerkits",
75    "c_utils:utils",
76    "common_event_service:cesfwk_innerkits",
77    "eventhandler:libeventhandler",
78    "graphic_2d:librender_service_base",
79    "graphic_2d:librender_service_client",
80    "hilog:libhilog",
81    "hitrace:hitrace_meter",
82    "input:libmmi-client",
83    "ipc:ipc_napi",
84    "ipc:ipc_single",
85    "napi:ace_napi",
86  ]
87
88  part_name = "window_manager"
89  subsystem_name = "window"
90
91  defines = []
92  if (build_variant == "user") {
93    defines += [ "IS_RELEASE_VERSION" ]
94  }
95}
96
97config("window_extension_module_private_config") {
98  visibility = [ ":*" ]
99
100  include_dirs = [ "include" ]
101}
102
103## Build libwindow_extension_module.so
104ohos_shared_library("window_extension_module") {
105  branch_protector_ret = "pac_ret"
106  sanitize = {
107    cfi = true
108    cfi_cross_dso = true
109    cfi_vcall_icall_only = true
110    debug = false
111  }
112  sources = [ "src/window_extension_module_loader.cpp" ]
113
114  configs = [
115    ":window_extension_module_private_config",
116    "../../resources/config/build:coverage_flags",
117  ]
118
119  deps = [ ":libwindow_extension" ]
120
121  external_deps = [
122    "ability_runtime:ability_context_native",
123    "ability_runtime:abilitykit_native",
124    "common_event_service:cesfwk_innerkits",
125    "hilog:libhilog",
126    "napi:ace_napi",
127  ]
128  relative_install_dir = "extensionability/"
129  subsystem_name = "window"
130  part_name = "window_manager"
131}
132
133group("test") {
134  testonly = true
135  deps = [ "test:test" ]
136}
137