• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2025 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("../../../wallpaper.gni")
16
17config("ability_config") {
18  visibility = [ ":*" ]
19  include_dirs = [
20    "${wallpaper_path}/frameworks/native/include",
21    "${wallpaper_path}/frameworks/kits/extension/include",
22  ]
23
24  cflags = []
25  if (target_cpu == "arm") {
26    cflags += [ "-DBINDER_IPC_32BIT" ]
27  }
28  defines = [
29    "APP_LOG_TAG = \"Ability\"",
30    "LOG_DOMAIN = 0xD002200",
31  ]
32}
33
34ohos_shared_library("wallpaperextensionability") {
35  cflags = [
36    "-fdata-sections",
37    "-ffunction-sections",
38    "-fvisibility=hidden",
39    "-Os",
40  ]
41
42  include_dirs = [
43    "${wallpaper_path}/frameworks/native/include",
44    "${wallpaper_path}/frameworks/kits/extension/include",
45    "${wallpaper_path}/utils/include",
46  ]
47
48  sources = [
49    "${wallpaper_path}/frameworks/kits/extension/src/js_wallpaper_extension_ability.cpp",
50    "${wallpaper_path}/frameworks/kits/extension/src/js_wallpaper_extension_context.cpp",
51    "${wallpaper_path}/frameworks/kits/extension/src/wallpaper_extension_ability.cpp",
52    "${wallpaper_path}/frameworks/kits/extension/src/wallpaper_extension_context.cpp",
53  ]
54
55  configs = [ ":ability_config" ]
56
57  deps = [ "${wallpaper_path}/frameworks/native:wallpapermanager" ]
58
59  external_deps = [
60    "ability_base:want",
61    "ability_runtime:ability_context_native",
62    "ability_runtime:ability_manager",
63    "ability_runtime:ability_start_options",
64    "ability_runtime:abilitykit_utils",
65    "ability_runtime:app_context",
66    "ability_runtime:extensionkit_native",
67    "ability_runtime:napi_common",
68    "ability_runtime:runtime",
69    "c_utils:utils",
70    "eventhandler:libeventhandler",
71    "hilog:libhilog",
72    "hitrace:hitrace_meter",
73    "ipc:ipc_napi",
74    "ipc:ipc_single",
75    "napi:ace_napi",
76    "player_framework:media_client",
77    "window_manager:libwm",
78  ]
79
80  sanitize = {
81    cfi = true
82    cfi_cross_dso = true
83    cfi_vcall_icall_only = true
84    debug = false
85    integer_overflow = true
86    boundary_sanitize = true
87    ubsan = true
88  }
89  branch_protector_ret = "pac_ret"
90  subsystem_name = "theme"
91  part_name = "wallpaper_mgr"
92}
93
94ohos_shared_library("wallpaper_extension_module") {
95  cflags = [
96    "-fdata-sections",
97    "-ffunction-sections",
98    "-fvisibility=hidden",
99    "-Os",
100  ]
101
102  sources = [ "${wallpaper_path}/frameworks/kits/extension/src/wallpaper_extension_module_loader.cpp" ]
103
104  configs = [ ":ability_config" ]
105
106  deps = [ ":wallpaperextensionability" ]
107
108  external_deps = [
109    "ability_base:configuration",
110    "ability_runtime:abilitykit_native",
111    "ability_runtime:runtime",
112    "hilog:libhilog",
113    "ipc:ipc_napi",
114    "ipc:ipc_single",
115    "napi:ace_napi",
116  ]
117  sanitize = {
118    cfi = true
119    cfi_cross_dso = true
120    cfi_vcall_icall_only = true
121    debug = false
122    integer_overflow = true
123    boundary_sanitize = true
124    ubsan = true
125  }
126  branch_protector_ret = "pac_ret"
127  relative_install_dir = "extensionability/"
128  subsystem_name = "theme"
129  part_name = "wallpaper_mgr"
130}
131