• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("../../intell_voice_service.gni")
16
17ohos_shared_library("intelligentvoice_trigger") {
18  configs = [ "//build/config/compiler:exceptions" ]
19  if (intelligent_voice_framework_trigger_enable) {
20    sources = [
21      "server/connector_mgr/trigger_callback_impl.cpp",
22      "server/connector_mgr/trigger_connector.cpp",
23      "server/connector_mgr/trigger_connector_internal_impl.cpp",
24      "server/connector_mgr/trigger_connector_internal_validation.cpp",
25      "server/connector_mgr/trigger_connector_mgr.cpp",
26      "server/connector_mgr/trigger_host_manager.cpp",
27      "server/trigger_base_type.cpp",
28      "server/trigger_callback_message.cpp",
29      "server/trigger_db_helper.cpp",
30      "server/trigger_detector.cpp",
31      "server/trigger_detector_callback.cpp",
32      "server/trigger_detector_recognition_callback.cpp",
33      "server/trigger_helper.cpp",
34      "server/trigger_manager.cpp",
35      "server/trigger_service.cpp",
36    ]
37
38    include_dirs = [
39      "inc",
40      "../../../../ai/intelligent_voice_framework/utils",
41      "../../../../ai/intelligent_voice_framework/interfaces/inner_api/native",
42      "server",
43      "server/connector_mgr",
44      "../intell_voice_service/inc",
45    ]
46
47    external_deps = [
48      "ability_runtime:ability_manager",
49      "audio_framework:audio_client",
50      "c_utils:utils",
51      "drivers_interface_intelligent_voice:intell_voice_trigger_idl_headers",
52      "drivers_interface_intelligent_voice:libintell_voice_trigger_proxy_1.0",
53      "drivers_interface_intelligent_voice:libintell_voice_trigger_proxy_1.1",
54      "ffrt:libffrt",
55      "hdf_core:libhdf_host",
56      "hdf_core:libhdi",
57      "hilog:libhilog",
58      "huks:libhukssdk",
59      "ipc:ipc_core",
60      "kv_store:distributeddata_inner",
61      "power_manager:powermgr_client",
62      "relational_store:native_rdb",
63      "safwk:system_ability_fwk",
64      "samgr:samgr_proxy",
65    ]
66  } else {
67    sources = [
68      "server/dummy_trigger_manager.cpp",
69      "server/trigger_callback_message.cpp",
70    ]
71    include_dirs = [
72      "inc",
73      "../../../../ai/intelligent_voice_framework/utils",
74      "../intell_voice_service/inc",
75    ]
76    external_deps = [ "hilog:libhilog" ]
77  }
78
79  cflags_cc = [
80    "-Wno-error=unused-parameter",
81    "-DHILOG_ENABLE",
82    "-DENABLE_DEBUG",
83    "-DUSE_FFRT",
84  ]
85
86  defines = []
87  if (build_variant == "root") {
88    defines += [ "INTELL_VOICE_BUILD_VARIANT_ROOT" ]
89  }
90
91  deps = [ "../../utils:intell_voice_utils" ]
92
93  sanitize = {
94    cfi = true
95    cfi_cross_dso = true
96    cfi_vcall_icall_only = true
97    debug = false
98  }
99
100  branch_protector_ret = "pac_ret"
101
102  if (telephony_service_enable) {
103    external_deps += [
104      "call_manager:tel_call_manager_api",
105      "core_service:tel_core_service_api",
106      "state_registry:tel_state_registry_api",
107    ]
108    defines += [ "SUPPORT_TELEPHONY_SERVICE" ]
109  }
110
111  subsystem_name = "ai"
112  part_name = "intelligent_voice_framework"
113}
114