1# Copyright (C) 2022 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") 15 16config("ui_appearance_service_config") { 17 visibility = [ ":*" ] 18 include_dirs = [ 19 "include", 20 "utils/include/", 21 ] 22} 23 24ohos_shared_library("ui_appearance_service") { 25 sanitize = { 26 cfi = true # Enable/disable control flow integrity detection 27 cfi_cross_dso = true # Cross-SO CFI Checks 28 debug = false 29 } 30 31 sources = [ 32 "src/dark_mode_manager.cpp", 33 "src/ui_appearance_ability.cpp", 34 "src/ui_appearance_ability_stub.cpp", 35 "utils/src/alarm_timer.cpp", 36 "utils/src/alarm_timer_manager.cpp", 37 "utils/src/setting_data_manager.cpp", 38 "utils/src/setting_data_observer.cpp", 39 ] 40 41 public_configs = [ ":ui_appearance_service_config" ] 42 43 cflags_cc = [ 44 "-fvisibility=hidden", 45 "-fvisibility-inlines-hidden", 46 "-Oz", 47 "-fdata-sections", 48 "-ffunction-sections", 49 "-fno-asynchronous-unwind-tables", 50 "-fno-unwind-tables", 51 ] 52 ldflags = [ "-Wl,--gc-sections" ] 53 54 include_dirs = [ 55 "include/", 56 "utils/include/", 57 ] 58 59 external_deps = [ 60 "ability_base:configuration", 61 "ability_runtime:app_manager", 62 "ability_runtime:dataobs_manager", 63 "ability_runtime:wantagent_innerkits", 64 "access_token:libaccesstoken_sdk", 65 "c_utils:utils", 66 "common_event_service:cesfwk_core", 67 "common_event_service:cesfwk_innerkits", 68 "data_share:datashare_consumer", 69 "hilog:libhilog", 70 "init:libbegetutil", 71 "ipc:ipc_single", 72 "os_account:os_account_innerkits", 73 "safwk:system_ability_fwk", 74 "samgr:samgr_proxy", 75 "time_service:time_client", 76 ] 77 subsystem_name = "arkui" 78 part_name = "ui_appearance" 79} 80 81ohos_shared_library("ui_appearance_client") { 82 sources = [ 83 "src/ui_appearance_ability_client.cpp", 84 "src/ui_appearance_ability_proxy.cpp", 85 ] 86 87 public_configs = [ ":ui_appearance_service_config" ] 88 include_dirs = [ "include/" ] 89 deps = [] 90 external_deps = [ 91 "c_utils:utils", 92 "hicollie:libhicollie", 93 "hilog:libhilog", 94 "ipc:ipc_single", 95 "safwk:system_ability_fwk", 96 "samgr:samgr_proxy", 97 ] 98 99 cflags_cc = [ 100 "-fvisibility=hidden", 101 "-fvisibility-inlines-hidden", 102 "-Oz", 103 "-fdata-sections", 104 "-ffunction-sections", 105 "-fno-asynchronous-unwind-tables", 106 "-fno-unwind-tables", 107 ] 108 ldflags = [ "-Wl,--gc-sections" ] 109 110 subsystem_name = "arkui" 111 innerapi_tags = [ "platformsdk" ] 112 part_name = "ui_appearance" 113} 114