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_engine_manager_service_1.2") {
18  include_dirs = [
19    "../../interfaces",
20    "../../utils",
21  ]
22
23  sources = [
24    "intell_voice_engine_adapter_impl.cpp",
25    "intell_voice_engine_manager_impl.cpp",
26  ]
27
28  if (is_standard_system) {
29    external_deps = [
30      "c_utils:utils",
31      "drivers_interface_intelligent_voice:intell_voice_engine_idl_headers",
32      "hilog:libhilog",
33      "ipc:ipc_single",
34    ]
35  } else {
36    external_deps = [
37      "hilog:libhilog",
38      "ipc:ipc_single",
39    ]
40  }
41
42  install_enable = true
43  install_images = [ chipset_base_dir ]
44  subsystem_name = "hdf"
45  part_name = "drivers_peripheral_intelligent_voice"
46}
47
48ohos_shared_library("intell_voice_engine_driver") {
49  include_dirs = [ "../../utils" ]
50
51  sources = [ "intell_voice_engine_driver.cpp" ]
52
53  if (is_standard_system) {
54    external_deps = [
55      "c_utils:utils",
56      "drivers_interface_intelligent_voice:libintell_voice_engine_stub_1.0",
57      "drivers_interface_intelligent_voice:libintell_voice_engine_stub_1.1",
58      "drivers_interface_intelligent_voice:libintell_voice_engine_stub_1.2",
59      "hdf_core:libhdf_host",
60      "hdf_core:libhdf_ipc_adapter",
61      "hdf_core:libhdf_utils",
62      "hdf_core:libhdi",
63      "hilog:libhilog",
64      "ipc:ipc_single",
65    ]
66  } else {
67    external_deps = [
68      "hilog:libhilog",
69      "ipc:ipc_single",
70    ]
71  }
72
73  shlib_type = "hdi"
74  install_enable = true
75  install_images = [ chipset_base_dir ]
76  subsystem_name = "hdf"
77  part_name = "drivers_peripheral_intelligent_voice"
78}
79
80group("hdi_intell_voice_engine_service") {
81  deps = [
82    ":intell_voice_engine_driver",
83    ":intell_voice_engine_manager_service_1.2",
84    "etc:intelligent_voice_engine_cfg",
85  ]
86
87  if (drivers_peripheral_intelligent_voice_feature_community) {
88    deps += [ "../../passthrough:vendor_intell_voice_engine" ]
89  }
90}
91