• 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("intell_voice_server") {
18  configs = [ "//build/config/compiler:exceptions" ]
19
20  sources = [
21    "server/sa/intell_voice_engine_registrar.cpp",
22    "server/sa/intell_voice_service.cpp",
23    "server/sa/intell_voice_service_manager.cpp",
24    "server/sa/intell_voice_service_stub.cpp",
25    "server/sa/intell_voice_trigger_registrar.cpp",
26    "server/utils/switch_observer.cpp",
27    "server/utils/switch_provider.cpp",
28    "server/utils/system_event_observer.cpp",
29  ]
30
31  include_dirs = [
32    "inc",
33    "../../../../ai/intelligent_voice_framework/utils",
34    "../../../../ai/intelligent_voice_framework/interfaces/inner_api/native",
35    "server/sa",
36    "server/utils",
37    "../intell_voice_engine/inc",
38    "../intell_voice_trigger/inc",
39  ]
40
41  cflags_cc = [
42    "-Wno-error=unused-parameter",
43    "-DHILOG_ENABLE",
44    "-DENABLE_DEBUG",
45    "-DUSE_FFRT",
46  ]
47
48  defines = []
49  if (build_variant == "root") {
50    defines += [ "INTELL_VOICE_BUILD_VARIANT_ROOT" ]
51  }
52
53  deps = [
54    "../../utils:intell_voice_utils",
55    "../intell_voice_engine:intelligentvoice_engine",
56    "../intell_voice_trigger:intelligentvoice_trigger",
57  ]
58
59  external_deps = [
60    "ability_runtime:ability_manager",
61    "access_token:libaccesstoken_sdk",
62    "c_utils:utils",
63    "common_event_service:cesfwk_innerkits",
64    "data_share:datashare_consumer",
65    "ffrt:libffrt",
66    "hilog:libhilog",
67    "ipc:ipc_core",
68    "kv_store:distributeddata_inner",
69    "safwk:system_ability_fwk",
70    "samgr:samgr_proxy",
71  ]
72
73  public_external_deps = [ "libxml2:libxml2" ]
74
75  sanitize = {
76    cfi = true
77    cfi_cross_dso = true
78    cfi_vcall_icall_only = true
79    debug = false
80  }
81
82  branch_protector_ret = "pac_ret"
83
84  if (intelligent_voice_framework_trigger_enable) {
85    cflags_cc += [ "-DTRIGGER_ENABLE" ]
86  }
87
88  if (intelligent_voice_framework_engine_enable) {
89    cflags_cc += [ "-DENGINE_ENABLE" ]
90  }
91
92  if (intelligent_voice_framework_only_first_stage) {
93    cflags_cc += [ "-DONLY_FIRST_STAGE" ]
94  }
95  subsystem_name = "ai"
96  part_name = "intelligent_voice_framework"
97}
98