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 "ability_runtime:ability_connect_callback_stub", 52 "access_token:libaccesstoken_sdk", 53 "access_token:libtokenid_sdk", 54 "bundle_framework:appexecfwk_core", 55 "c_utils:utils", 56 "common_event_service:cesfwk_innerkits", 57 "config_policy:configpolicy_util", 58 "eventhandler:libeventhandler", 59 "graphic_2d:color_manager", 60 "graphic_2d:color_picker", 61 "hilog:libhilog", 62 "hitrace:hitrace_meter", 63 "init:libbegetutil", 64 "ipc:ipc_single", 65 "memmgr:memmgrclient", 66 "os_account:os_account_innerkits", 67 "safwk:system_ability_fwk", 68 "samgr:samgr_proxy", 69 "window_manager:libwsutils", 70 ] 71 sanitize = { 72 cfi = true 73 cfi_cross_dso = true 74 debug = false 75 integer_overflow = true 76 boundary_sanitize = true 77 ubsan = true 78 } 79 branch_protector_ret = "pac_ret" 80 if (ability_runtime_graphics) { 81 external_deps += [ "image_framework:image_native" ] 82 } 83 84 defines = [] 85 if (theme_service) { 86 defines += [ "THEME_SERVICE" ] 87 } else { 88 external_deps += [ 89 "ability_runtime:ability_manager", 90 "ability_runtime:abilitykit_native", 91 ] 92 sources += [ 93 "src/wallpaper_extension_ability_connection.cpp", 94 "src/wallpaper_extension_ability_death_recipient.cpp", 95 ] 96 } 97 98 subsystem_name = "theme" 99 part_name = "wallpaper_mgr" 100} 101