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/test.gni") 15import("../../device_status.gni") 16 17config("devicestatus_public_config") { 18 include_dirs = [ 19 "include", 20 "${device_status_service_path}/native/include", 21 "${device_status_frameworks_path}/js/napi/include", 22 "${device_status_frameworks_path}/native/event_handler/include", 23 "${device_status_frameworks_path}/native/interaction/include", 24 "${device_status_utils_path}/include", 25 "${device_status_interfaces_path}/innerkits/include", 26 "${device_status_interfaces_path}/innerkits/interaction/include", 27 "${device_status_root_path}/utils/ipc/include", 28 "${device_status_root_path}/services/communication/base/", 29 "${device_status_root_path}/services/communication/client/include", 30 ] 31 32 if (device_status_intention_framework) { 33 include_dirs += 34 [ "${device_status_root_path}/intention/frameworks/client/include" ] 35 } 36 37 defines = device_status_default_defines 38} 39 40ohos_shared_library("devicestatus_client") { 41 sanitize = { 42 integer_overflow = true 43 ubsan = true 44 boundary_sanitize = true 45 cfi = true 46 cfi_cross_dso = true 47 debug = false 48 } 49 50 branch_protector_ret = "pac_ret" 51 52 version_script = "libdevicestatus_client_map" 53 sources = [ 54 "${device_status_frameworks_path}/native/interaction/src/drag_data_util.cpp", 55 "${device_status_frameworks_path}/native/interaction/src/drag_manager_impl.cpp", 56 "${device_status_frameworks_path}/native/interaction/src/interaction_manager.cpp", 57 "${device_status_frameworks_path}/native/src/client.cpp", 58 "${device_status_frameworks_path}/native/src/devicestatus_callback_proxy.cpp", 59 "${device_status_frameworks_path}/native/src/devicestatus_callback_stub.cpp", 60 "${device_status_frameworks_path}/native/src/devicestatus_client.cpp", 61 "${device_status_frameworks_path}/native/src/fd_listener.cpp", 62 "${device_status_frameworks_path}/native/src/stationary_manager.cpp", 63 "${device_status_root_path}/services/communication/client/src/devicestatus_srv_proxy.cpp", 64 ] 65 66 if (device_status_intention_framework) { 67 sources += [ "${device_status_root_path}/intention/frameworks/client/src/intention_manager.cpp" ] 68 } else { 69 sources += [ "${device_status_frameworks_path}/native/interaction/src/interaction_manager_impl.cpp" ] 70 if (device_status_interaction_coordination) { 71 sources += [ "${device_status_frameworks_path}/native/interaction/src/coordination_manager_impl.cpp" ] 72 } 73 } 74 75 configs = [ "${device_status_utils_path}:devicestatus_utils_config" ] 76 77 deps = [ 78 "${device_status_root_path}/utils/ipc:devicestatus_ipc", 79 "${device_status_utils_path}:devicestatus_util", 80 ] 81 82 public_configs = [ ":devicestatus_public_config" ] 83 84 if (device_status_intention_framework) { 85 deps += [ 86 "${device_status_root_path}/intention/cooperate/client:intention_cooperate_client", 87 "${device_status_root_path}/intention/drag/client:intention_drag_client", 88 "${device_status_root_path}/intention/ipc/socket:intention_socket_connection", 89 "${device_status_root_path}/intention/ipc/tunnel:intention_tunnel_client", 90 "${device_status_root_path}/intention/prototype:intention_prototype", 91 "${device_status_root_path}/intention/stationary/client:intention_stationary_client", 92 ] 93 } 94 95 if (device_status_rust_enabled) { 96 include_dirs = 97 [ "${device_status_root_path}/rust/frameworks/binding/include" ] 98 99 deps += [ 100 "${device_status_root_path}/rust/data/binding:fusion_data_binding", 101 "${device_status_root_path}/rust/frameworks/client:fusion_client_ffi", 102 ] 103 } 104 105 external_deps = [ 106 "c_utils:utils", 107 "eventhandler:libeventhandler", 108 "graphic_2d:librender_service_client", 109 "hilog:libhilog", 110 "hitrace:hitrace_meter", 111 "image_framework:image_native", 112 "ipc:ipc_single", 113 "samgr:samgr_proxy", 114 "window_manager:libdm", 115 ] 116 117 innerapi_tags = [ "platformsdk" ] 118 subsystem_name = "${device_status_subsystem_name}" 119 part_name = "${device_status_part_name}" 120} 121