1# Copyright (c) 2021-2024 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("../../distributedinput.gni") 16 17config("input_sdk_public_config") { 18 include_dirs = [ 19 "${common_path}/include", 20 "${frameworks_path}/include", 21 "${innerkits_path}/include", 22 "${innerkits_path}/src", 23 "${ipc_path}/include", 24 "${ipc_path}/src", 25 "${utils_path}/include", 26 ] 27} 28ohos_shared_library("libdinput_sdk") { 29 sanitize = { 30 boundary_sanitize = true 31 integer_overflow = true 32 ubsan = true 33 cfi = true 34 cfi_cross_dso = true 35 debug = false 36 } 37 branch_protector_ret = "pac_ret" 38 public_configs = [ ":input_sdk_public_config" ] 39 40 public_external_deps = [ 41 "distributed_hardware_fwk:distributed_av_receiver", 42 "distributed_hardware_fwk:distributed_av_sender", 43 "distributed_hardware_fwk:distributedhardwareutils", 44 "distributed_hardware_fwk:libdhfwk_sdk", 45 "json:nlohmann_json_static", 46 ] 47 48 sources = [ 49 "${common_path}/include/input_check_param.cpp", 50 "${common_path}/include/white_list_util.cpp", 51 "${innerkits_path}/src/distributed_input_kit.cpp", 52 "${ipc_path}/src/add_white_list_infos_call_back_proxy.cpp", 53 "${ipc_path}/src/add_white_list_infos_call_back_stub.cpp", 54 "${ipc_path}/src/del_white_list_infos_call_back_proxy.cpp", 55 "${ipc_path}/src/del_white_list_infos_call_back_stub.cpp", 56 "${ipc_path}/src/dinput_sa_manager.cpp", 57 "${ipc_path}/src/distributed_input_client.cpp", 58 "${ipc_path}/src/distributed_input_sink_proxy.cpp", 59 "${ipc_path}/src/distributed_input_sink_stub.cpp", 60 "${ipc_path}/src/distributed_input_source_proxy.cpp", 61 "${ipc_path}/src/distributed_input_source_stub.cpp", 62 "${ipc_path}/src/get_sink_screen_infos_call_back_proxy.cpp", 63 "${ipc_path}/src/get_sink_screen_infos_call_back_stub.cpp", 64 "${ipc_path}/src/input_node_listener_proxy.cpp", 65 "${ipc_path}/src/input_node_listener_stub.cpp", 66 "${ipc_path}/src/prepare_d_input_call_back_proxy.cpp", 67 "${ipc_path}/src/prepare_d_input_call_back_stub.cpp", 68 "${ipc_path}/src/register_d_input_call_back_proxy.cpp", 69 "${ipc_path}/src/register_d_input_call_back_stub.cpp", 70 "${ipc_path}/src/register_session_state_callback_proxy.cpp", 71 "${ipc_path}/src/register_session_state_callback_stub.cpp", 72 "${ipc_path}/src/sharing_dhid_listener_proxy.cpp", 73 "${ipc_path}/src/sharing_dhid_listener_stub.cpp", 74 "${ipc_path}/src/simulation_event_listener_proxy.cpp", 75 "${ipc_path}/src/simulation_event_listener_stub.cpp", 76 "${ipc_path}/src/start_d_input_call_back_proxy.cpp", 77 "${ipc_path}/src/start_d_input_call_back_stub.cpp", 78 "${ipc_path}/src/start_stop_d_inputs_call_back_proxy.cpp", 79 "${ipc_path}/src/start_stop_d_inputs_call_back_stub.cpp", 80 "${ipc_path}/src/start_stop_result_call_back_proxy.cpp", 81 "${ipc_path}/src/start_stop_result_call_back_stub.cpp", 82 "${ipc_path}/src/stop_d_input_call_back_proxy.cpp", 83 "${ipc_path}/src/stop_d_input_call_back_stub.cpp", 84 "${ipc_path}/src/unprepare_d_input_call_back_proxy.cpp", 85 "${ipc_path}/src/unprepare_d_input_call_back_stub.cpp", 86 "${ipc_path}/src/unregister_d_input_call_back_proxy.cpp", 87 "${ipc_path}/src/unregister_d_input_call_back_stub.cpp", 88 ] 89 90 deps = [ "${utils_path}:libdinput_utils" ] 91 92 defines = [ 93 "HI_LOG_ENABLE", 94 "DH_LOG_TAG=\"distributedinputclient\"", 95 "LOG_DOMAIN=0xD004120", 96 ] 97 98 cflags = [ 99 "-fstack-protector-strong", 100 "-D_FORTIFY_SOURCE=2", 101 "-O2", 102 ] 103 104 external_deps = [ 105 "access_token:libaccesstoken_sdk", 106 "access_token:libtokenid_sdk", 107 "c_utils:utils", 108 "config_policy:configpolicy_util", 109 "dsoftbus:softbus_client", 110 "eventhandler:libeventhandler", 111 "hilog:libhilog", 112 "ipc:ipc_core", 113 "libevdev:libevdev", 114 "safwk:system_ability_fwk", 115 "samgr:samgr_proxy", 116 ] 117 118 cflags_cc = [ 119 "-DHILOG_ENABLE", 120 "-fstack-protector-strong", 121 "-D_FORTIFY_SOURCE=2", 122 "-O2", 123 ] 124 125 subsystem_name = "distributedhardware" 126 127 part_name = "distributed_input" 128} 129