1# Copyright (c) 2023 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("../../intelligent_voice.gni") 16 17ohos_shared_library("intell_voice_trigger_manager_service_1.0") { 18 include_dirs = [ 19 "//third_party/bounds_checking_function/include", 20 "../../interfaces", 21 "../../utils", 22 ] 23 24 sources = [ 25 "../../utils/memory_guard.cpp", 26 "intell_voice_trigger_adapter_impl.cpp", 27 "intell_voice_trigger_manager_impl.cpp", 28 ] 29 30 defines = [] 31 if (use_musl) { 32 if (use_jemalloc && use_jemalloc_dfx_intf) { 33 defines += [ "CONFIG_USE_JEMALLOC_DFX_INTF" ] 34 } 35 } 36 37 if (is_standard_system) { 38 external_deps = [ 39 "c_utils:utils", 40 "drivers_interface_intelligent_voice:intell_voice_trigger_idl_headers", 41 "hilog:libhilog", 42 "ipc:ipc_single", 43 ] 44 } else { 45 external_deps = [ 46 "hilog:libhilog", 47 "ipc:ipc_single", 48 ] 49 } 50 51 install_enable = true 52 install_images = [ chipset_base_dir ] 53 subsystem_name = "hdf" 54 part_name = "drivers_peripheral_intelligent_voice" 55} 56 57ohos_shared_library("intell_voice_trigger_driver") { 58 include_dirs = [ "../../utils" ] 59 60 sources = [ "intell_voice_trigger_driver.cpp" ] 61 62 if (is_standard_system) { 63 external_deps = [ 64 "c_utils:utils", 65 "drivers_interface_intelligent_voice:libintell_voice_trigger_stub_1.0", 66 "hdf_core:libhdf_host", 67 "hdf_core:libhdf_ipc_adapter", 68 "hdf_core:libhdf_utils", 69 "hdf_core:libhdi", 70 "hilog:libhilog", 71 "ipc:ipc_single", 72 ] 73 } else { 74 external_deps = [ 75 "hilog:libhilog", 76 "ipc:ipc_single", 77 ] 78 } 79 80 shlib_type = "hdi" 81 install_enable = true 82 install_images = [ chipset_base_dir ] 83 subsystem_name = "hdf" 84 part_name = "drivers_peripheral_intelligent_voice" 85} 86 87group("hdi_intell_voice_trigger_service") { 88 deps = [ 89 ":intell_voice_trigger_driver", 90 ":intell_voice_trigger_manager_service_1.0", 91 ] 92 93 if (drivers_peripheral_intelligent_voice_feature_community) { 94 deps += [ "../../passthrough:vendor_intell_voice_trigger" ] 95 } 96} 97