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 "c_utils:utils", 54 "ffrt:libffrt", 55 "hilog:libhilog", 56 "image_framework:image_native", 57 "ipc:ipc_core", 58 "json:nlohmann_json_static", 59 "safwk:system_ability_fwk", 60 "samgr:samgr_proxy", 61 ] 62 63 defines = [] 64 if (window_manager_use_sceneboard) { 65 external_deps += [ "window_manager:libwm_lite" ] 66 defines += [ "SCENE_BOARD_ENABLE" ] 67 } else { 68 external_deps += [ "window_manager:libwm" ] 69 } 70 71 subsystem_name = "ability" 72 part_name = "ability_runtime" 73} 74 75# Note: Just for test 76ohos_static_library("dataobsms_static") { 77 branch_protector_ret = "pac_ret" 78 sanitize = { 79 cfi = true 80 cfi_cross_dso = true 81 debug = false 82 } 83 sources = dataobsms_files 84 85 configs = [ ":dataobsms_config" ] 86 87 deps = [ 88 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 89 "${ability_runtime_innerkits_path}/dataobs_manager:dataobs_manager", 90 ] 91 92 external_deps = [ 93 "ability_base:zuri", 94 "c_utils:utils", 95 "ffrt:libffrt", 96 "hilog:libhilog", 97 "image_framework:image_native", 98 "ipc:ipc_core", 99 "json:nlohmann_json_static", 100 "safwk:system_ability_fwk", 101 "samgr:samgr_proxy", 102 ] 103 104 defines = [] 105 if (window_manager_use_sceneboard) { 106 external_deps += [ "window_manager:libwm_lite" ] 107 defines += [ "SCENE_BOARD_ENABLE" ] 108 } else { 109 external_deps += [ "window_manager:libwm" ] 110 } 111 112 subsystem_name = "ability" 113 part_name = "ability_runtime" 114} 115