• 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("//foundation/ability/ability_runtime/ability_runtime.gni")
16import("../wallpaper.gni")
17
18config("wallpaper_service_config") {
19  visibility = [ ":*" ]
20  include_dirs = [
21    "include",
22    "${wallpaper_path}/utils/dfx/hisysevent_adapter",
23    "${wallpaper_path}/utils/dfx/hidumper_adapter",
24  ]
25}
26
27ohos_shared_library("wallpaper_service") {
28  sources = [
29    "src/component_name.cpp",
30    "src/wallpaper_common_event_manager.cpp",
31    "src/wallpaper_common_event_subscriber.cpp",
32    "src/wallpaper_data.cpp",
33    "src/wallpaper_event_listener_proxy.cpp",
34    "src/wallpaper_service.cpp",
35    "src/wallpaper_service_cb_proxy.cpp",
36    "src/wallpaper_service_stub.cpp",
37  ]
38  public_configs = [ ":wallpaper_service_config" ]
39  include_dirs = [
40    "${wallpaper_path}/frameworks/native/include",
41    "${wallpaper_path}/utils/include",
42    "${graphic_2d_path}/rosen/modules/effect/color_picker/include",
43    "${graphic_2d_path}/utils/color_manager",
44  ]
45  deps = [ "${utils_path}:wallpaper_utils" ]
46  external_deps = [
47    "ability_base:want",
48    "ability_base:zuri",
49    "ability_runtime:ability_connect_callback_stub",
50    "access_token:libaccesstoken_sdk",
51    "access_token:libtokenid_sdk",
52    "bundle_framework:appexecfwk_core",
53    "c_utils:utils",
54    "common_event_service:cesfwk_innerkits",
55    "config_policy:configpolicy_util",
56    "eventhandler:libeventhandler",
57    "graphic_2d:color_manager",
58    "graphic_2d:color_picker",
59    "hilog:libhilog",
60    "hitrace:hitrace_meter",
61    "init:libbegetutil",
62    "ipc:ipc_single",
63    "memmgr:memmgrclient",
64    "os_account:os_account_innerkits",
65    "safwk:system_ability_fwk",
66    "samgr:samgr_proxy",
67    "window_manager:libwsutils",
68  ]
69  cflags_cc = [
70    "-fdata-sections",
71    "-ffunction-sections",
72    "-Os",
73  ]
74
75  sanitize = {
76    cfi = true
77    cfi_cross_dso = true
78    cfi_vcall_icall_only = true
79    debug = false
80    integer_overflow = true
81    boundary_sanitize = true
82    ubsan = true
83  }
84  branch_protector_ret = "pac_ret"
85  if (ability_runtime_graphics) {
86    external_deps += [ "image_framework:image_native" ]
87  }
88
89  defines = []
90  if (theme_service) {
91    defines += [ "THEME_SERVICE" ]
92  } else {
93    external_deps += [
94      "ability_runtime:ability_manager",
95      "ability_runtime:abilitykit_native",
96    ]
97    sources += [
98      "src/wallpaper_extension_ability_connection.cpp",
99      "src/wallpaper_extension_ability_death_recipient.cpp",
100    ]
101  }
102
103  subsystem_name = "theme"
104  part_name = "wallpaper_mgr"
105}
106