• 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  cflags_cc = []
27}
28
29ohos_shared_library("wallpaper_service") {
30  sources = [
31    "src/component_name.cpp",
32    "src/wallpaper_common_event_manager.cpp",
33    "src/wallpaper_common_event_subscriber.cpp",
34    "src/wallpaper_data.cpp",
35    "src/wallpaper_event_listener_proxy.cpp",
36    "src/wallpaper_service.cpp",
37    "src/wallpaper_service_cb_proxy.cpp",
38    "src/wallpaper_service_stub.cpp",
39  ]
40  public_configs = [ ":wallpaper_service_config" ]
41  include_dirs = [
42    "${wallpaper_path}/frameworks/native/include",
43    "${wallpaper_path}/utils/include",
44    "${graphic_2d_path}/rosen/modules/effect/color_picker/include",
45    "${graphic_2d_path}/utils/color_manager",
46  ]
47  deps = [ "${utils_path}:wallpaper_utils" ]
48  external_deps = [
49    "ability_base:want",
50    "ability_base:zuri",
51    "access_token:libaccesstoken_sdk",
52    "access_token:libtokenid_sdk",
53    "bundle_framework:appexecfwk_core",
54    "c_utils:utils",
55    "common_event_service:cesfwk_innerkits",
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    "os_account:os_account_innerkits",
64    "safwk:system_ability_fwk",
65    "samgr:samgr_proxy",
66    "window_manager:libwsutils",
67  ]
68  sanitize = {
69    cfi = true
70    cfi_cross_dso = true
71    debug = false
72    integer_overflow = true
73    boundary_sanitize = true
74    ubsan = true
75  }
76  branch_protector_ret = "pac_ret"
77  if (ability_runtime_graphics) {
78    external_deps += [ "image_framework:image_native" ]
79  }
80
81  defines = []
82  if (theme_service) {
83    external_deps += [ "theme_mgr:theme_manager_client" ]
84    defines += [ "THEME_SERVICE" ]
85  } else {
86    external_deps += [
87      "ability_runtime:ability_manager",
88      "ability_runtime:abilitykit_native",
89    ]
90    sources += [
91      "src/wallpaper_extension_ability_connection.cpp",
92      "src/wallpaper_extension_ability_death_recipient.cpp",
93    ]
94  }
95
96  subsystem_name = "theme"
97  part_name = "wallpaper_mgr"
98}
99