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("//build/ohos/ace/ace.gni") 16 17js_declaration("intelligentvoice_js") { 18 part_name = "intelligent_voice_framework" 19 sources = [ "//foundation/ai/intelligent_voice_framework/interfaces/kits/js/@ohos.ai.intelligentVoice.d.ts" ] 20} 21 22ohos_copy("intelligentvoice_declaration") { 23 sources = [ "//foundation/ai/intelligent_voice_framework/interfaces/kits/js/@ohos.ai.intelligentVoice.d.ts" ] 24 outputs = [ target_out_dir + "/$target_name/" ] 25 module_source_dir = target_out_dir + "/$target_name" 26 module_install_name = "" 27} 28 29ohos_shared_library("intelligentvoice") { 30 sources = [ 31 "napi/engine_event_callback_napi.cpp", 32 "napi/enroll_intell_voice_engine_callback_napi.cpp", 33 "napi/enroll_intell_voice_engine_napi.cpp", 34 "napi/intell_voice_common_napi.cpp", 35 "napi/intell_voice_manager_napi.cpp", 36 "napi/intell_voice_napi_queue.cpp", 37 "napi/intell_voice_napi_util.cpp", 38 "napi/intell_voice_update_callback_napi.cpp", 39 "napi/service_change_callback_napi.cpp", 40 "napi/wakeup_intell_voice_engine_napi.cpp", 41 "napi/wakeup_manager_napi.cpp", 42 ] 43 44 include_dirs = [ 45 "../../../../arkui/napi/interfaces/kits", 46 "../../interfaces/inner_api/native", 47 "../../services/intell_voice_engine", 48 "../../services/intell_voice_engine/proxy", 49 "../../utils", 50 "napi", 51 ] 52 53 cflags_cc = [ 54 "-Wno-error=unused-parameter", 55 "-DHILOG_ENABLE", 56 "-DENABLE_DEBUG", 57 ] 58 59 deps = [ 60 "../../frameworks/native:intellvoice_native", 61 "../../services:intell_voice_proxy", 62 ] 63 64 external_deps = [ 65 "ability_base:want", 66 "c_utils:utils", 67 "drivers_interface_intelligent_voice:intell_voice_engine_idl_headers", 68 "hilog:libhilog", 69 "ipc:ipc_core", 70 "napi:ace_napi", 71 "safwk:system_ability_fwk", 72 "samgr:samgr_proxy", 73 ] 74 75 relative_install_dir = "module/ai" 76 subsystem_name = "ai" 77 part_name = "intelligent_voice_framework" 78} 79