1ce968135Sopenharmony_ci# Copyright (C) 2022-2023 Huawei Device Co., Ltd.
2ce968135Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3ce968135Sopenharmony_ci# you may not use this file except in compliance with the License.
4ce968135Sopenharmony_ci# You may obtain a copy of the License at
5ce968135Sopenharmony_ci#
6ce968135Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7ce968135Sopenharmony_ci#
8ce968135Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9ce968135Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10ce968135Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11ce968135Sopenharmony_ci# See the License for the specific language governing permissions and
12ce968135Sopenharmony_ci# limitations under the License.
13ce968135Sopenharmony_ci
14ce968135Sopenharmony_ciimport("//build/ohos.gni")
15ce968135Sopenharmony_ciimport("//foundation/ability/ability_runtime/ability_runtime.gni")
16ce968135Sopenharmony_ciimport("../wallpaper.gni")
17ce968135Sopenharmony_ci
18ce968135Sopenharmony_ciconfig("wallpaper_service_config") {
19ce968135Sopenharmony_ci  visibility = [ ":*" ]
20ce968135Sopenharmony_ci  include_dirs = [
21ce968135Sopenharmony_ci    "include",
22ce968135Sopenharmony_ci    "${wallpaper_path}/utils/dfx/hisysevent_adapter",
23ce968135Sopenharmony_ci    "${wallpaper_path}/utils/dfx/hidumper_adapter",
24ce968135Sopenharmony_ci  ]
25ce968135Sopenharmony_ci
26ce968135Sopenharmony_ci  cflags_cc = []
27ce968135Sopenharmony_ci}
28ce968135Sopenharmony_ci
29ce968135Sopenharmony_ciohos_shared_library("wallpaper_service") {
30ce968135Sopenharmony_ci  sources = [
31ce968135Sopenharmony_ci    "src/component_name.cpp",
32ce968135Sopenharmony_ci    "src/wallpaper_common_event_manager.cpp",
33ce968135Sopenharmony_ci    "src/wallpaper_common_event_subscriber.cpp",
34ce968135Sopenharmony_ci    "src/wallpaper_data.cpp",
35ce968135Sopenharmony_ci    "src/wallpaper_event_listener_proxy.cpp",
36ce968135Sopenharmony_ci    "src/wallpaper_service.cpp",
37ce968135Sopenharmony_ci    "src/wallpaper_service_cb_proxy.cpp",
38ce968135Sopenharmony_ci    "src/wallpaper_service_stub.cpp",
39ce968135Sopenharmony_ci  ]
40ce968135Sopenharmony_ci  public_configs = [ ":wallpaper_service_config" ]
41ce968135Sopenharmony_ci  include_dirs = [
42ce968135Sopenharmony_ci    "${wallpaper_path}/frameworks/native/include",
43ce968135Sopenharmony_ci    "${wallpaper_path}/utils/include",
44ce968135Sopenharmony_ci    "${graphic_2d_path}/rosen/modules/effect/color_picker/include",
45ce968135Sopenharmony_ci    "${graphic_2d_path}/utils/color_manager",
46ce968135Sopenharmony_ci  ]
47ce968135Sopenharmony_ci  deps = [ "${utils_path}:wallpaper_utils" ]
48ce968135Sopenharmony_ci  external_deps = [
49ce968135Sopenharmony_ci    "ability_base:want",
50ce968135Sopenharmony_ci    "ability_base:zuri",
51ce968135Sopenharmony_ci    "ability_runtime:ability_connect_callback_stub",
52ce968135Sopenharmony_ci    "access_token:libaccesstoken_sdk",
53ce968135Sopenharmony_ci    "access_token:libtokenid_sdk",
54ce968135Sopenharmony_ci    "bundle_framework:appexecfwk_core",
55ce968135Sopenharmony_ci    "c_utils:utils",
56ce968135Sopenharmony_ci    "common_event_service:cesfwk_innerkits",
57ce968135Sopenharmony_ci    "config_policy:configpolicy_util",
58ce968135Sopenharmony_ci    "eventhandler:libeventhandler",
59ce968135Sopenharmony_ci    "graphic_2d:color_manager",
60ce968135Sopenharmony_ci    "graphic_2d:color_picker",
61ce968135Sopenharmony_ci    "hilog:libhilog",
62ce968135Sopenharmony_ci    "hitrace:hitrace_meter",
63ce968135Sopenharmony_ci    "init:libbegetutil",
64ce968135Sopenharmony_ci    "ipc:ipc_single",
65ce968135Sopenharmony_ci    "memmgr:memmgrclient",
66ce968135Sopenharmony_ci    "os_account:os_account_innerkits",
67ce968135Sopenharmony_ci    "safwk:system_ability_fwk",
68ce968135Sopenharmony_ci    "samgr:samgr_proxy",
69ce968135Sopenharmony_ci    "window_manager:libwsutils",
70ce968135Sopenharmony_ci  ]
71ce968135Sopenharmony_ci  sanitize = {
72ce968135Sopenharmony_ci    cfi = true
73ce968135Sopenharmony_ci    cfi_cross_dso = true
74ce968135Sopenharmony_ci    debug = false
75ce968135Sopenharmony_ci    integer_overflow = true
76ce968135Sopenharmony_ci    boundary_sanitize = true
77ce968135Sopenharmony_ci    ubsan = true
78ce968135Sopenharmony_ci  }
79ce968135Sopenharmony_ci  branch_protector_ret = "pac_ret"
80ce968135Sopenharmony_ci  if (ability_runtime_graphics) {
81ce968135Sopenharmony_ci    external_deps += [ "image_framework:image_native" ]
82ce968135Sopenharmony_ci  }
83ce968135Sopenharmony_ci
84ce968135Sopenharmony_ci  defines = []
85ce968135Sopenharmony_ci  if (theme_service) {
86ce968135Sopenharmony_ci    defines += [ "THEME_SERVICE" ]
87ce968135Sopenharmony_ci  } else {
88ce968135Sopenharmony_ci    external_deps += [
89ce968135Sopenharmony_ci      "ability_runtime:ability_manager",
90ce968135Sopenharmony_ci      "ability_runtime:abilitykit_native",
91ce968135Sopenharmony_ci    ]
92ce968135Sopenharmony_ci    sources += [
93ce968135Sopenharmony_ci      "src/wallpaper_extension_ability_connection.cpp",
94ce968135Sopenharmony_ci      "src/wallpaper_extension_ability_death_recipient.cpp",
95ce968135Sopenharmony_ci    ]
96ce968135Sopenharmony_ci  }
97ce968135Sopenharmony_ci
98ce968135Sopenharmony_ci  subsystem_name = "theme"
99ce968135Sopenharmony_ci  part_name = "wallpaper_mgr"
100ce968135Sopenharmony_ci}
101