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