1# Copyright (c) 2021-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") 15import("//foundation/ability/ability_runtime/ability_runtime.gni") 16import("//foundation/ability/ability_runtime/services/dataobsmgr/dataobsms.gni") 17 18group("dataobsms_target") { 19 deps = [ ":dataobsms" ] 20} 21 22config("dataobsms_config") { 23 include_dirs = [ 24 "include/", 25 "${ability_runtime_services_path}/common/include", 26 ] 27 cflags = [] 28 if (target_cpu == "arm") { 29 cflags += [ "-DBINDER_IPC_32BIT" ] 30 } 31} 32 33ohos_shared_library("dataobsms") { 34 branch_protector_ret = "pac_ret" 35 sanitize = { 36 cfi = true 37 cfi_cross_dso = true 38 debug = false 39 } 40 shlib_type = "sa" 41 sources = dataobsms_files 42 43 configs = [ ":dataobsms_config" ] 44 45 deps = [ 46 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 47 "${ability_runtime_innerkits_path}/dataobs_manager:dataobs_manager", 48 "${ability_runtime_services_path}/common:task_handler_wrap", 49 ] 50 51 external_deps = [ 52 "ability_base:zuri", 53 "access_token:libaccesstoken_sdk", 54 "access_token:libtokenid_sdk", 55 "bundle_framework:appexecfwk_base", 56 "bundle_framework:appexecfwk_core", 57 "c_utils:utils", 58 "cJSON:cjson", 59 "data_share:datashare_permission", 60 "ffrt:libffrt", 61 "hilog:libhilog", 62 "image_framework:image_native", 63 "ipc:ipc_core", 64 "json:nlohmann_json_static", 65 "resource_management:global_resmgr", 66 "safwk:system_ability_fwk", 67 "samgr:samgr_proxy", 68 "os_account:os_account_innerkits" 69 ] 70 71 defines = [] 72 if (window_manager_use_sceneboard) { 73 external_deps += [ "window_manager:libwm_lite" ] 74 defines += [ "SCENE_BOARD_ENABLE" ] 75 } else { 76 external_deps += [ "window_manager:libwm" ] 77 } 78 79 subsystem_name = "ability" 80 part_name = "ability_runtime" 81} 82 83# Note: Just for test 84ohos_static_library("dataobsms_static") { 85 branch_protector_ret = "pac_ret" 86 sanitize = { 87 cfi = true 88 cfi_cross_dso = true 89 debug = false 90 } 91 sources = dataobsms_files 92 93 configs = [ ":dataobsms_config" ] 94 95 deps = [ 96 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 97 "${ability_runtime_innerkits_path}/dataobs_manager:dataobs_manager", 98 ] 99 100 external_deps = [ 101 "ability_base:zuri", 102 "access_token:libaccesstoken_sdk", 103 "access_token:libtokenid_sdk", 104 "bundle_framework:appexecfwk_base", 105 "bundle_framework:appexecfwk_core", 106 "c_utils:utils", 107 "cJSON:cjson", 108 "data_share:datashare_permission", 109 "ffrt:libffrt", 110 "hilog:libhilog", 111 "image_framework:image_native", 112 "ipc:ipc_core", 113 "json:nlohmann_json_static", 114 "resource_management:global_resmgr", 115 "safwk:system_ability_fwk", 116 "samgr:samgr_proxy", 117 "os_account:os_account_innerkits" 118 ] 119 120 defines = [] 121 if (window_manager_use_sceneboard) { 122 external_deps += [ "window_manager:libwm_lite" ] 123 defines += [ "SCENE_BOARD_ENABLE" ] 124 } else { 125 external_deps += [ "window_manager:libwm" ] 126 } 127 128 subsystem_name = "ability" 129 part_name = "ability_runtime" 130} 131