• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2024 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("//foundation/multimedia/ringtone_library/ringtone_library.gni")
16
17config("ringtone_helper_public_config") {
18  visibility = [ ":*" ]
19}
20
21ohos_shared_library("ringtone_data_helper") {
22  branch_protector_ret = "pac_ret"
23  install_enable = true
24
25  include_dirs = [
26    "${RINGTONE_SCANNER_PATH}/include",
27    "${RINGTONE_RESTORE_PATH}/include",
28    "${RINGTONE_EXTENSION_PATH}/include",
29    "${RINGTONE_DFX_PATH}/include",
30    "${RINGTONE_SERVICES_PATH}/utils/include",
31    "${RINGTONE_INTERFACES_PATH}/inner_api/native",
32  ]
33
34  sources = [
35    "src/ringtone_asset.cpp",
36    "src/ringtone_check_utils.cpp",
37    "src/ringtone_fetch_result.cpp",
38    "src/simcard_setting_asset.cpp",
39    "src/vibrate_asset.cpp",
40  ]
41
42  public_configs = [ ":ringtone_helper_public_config" ]
43
44  cflags = [
45    "-Wall",
46    "-Werror",
47    "-Wno-unused-but-set-variable",
48    "-fdata-sections",
49    "-ffunction-sections",
50    "-Os",
51  ]
52
53  cflags_cc = [
54    "-fvisibility-inlines-hidden",
55    "-Os",
56  ]
57
58  external_deps = [
59    "ability_base:zuri",
60    "ability_runtime:abilitykit_native",
61    "app_file_service:sandbox_helper_native",
62    "c_utils:utils",
63    "common_event_service:cesfwk_innerkits",
64    "data_share:datashare_common",
65    "data_share:datashare_consumer",
66    "hilog:libhilog",
67    "hitrace:hitrace_meter",
68    "ipc:ipc_single",
69    "kv_store:distributeddata_inner",
70    "relational_store:native_rdb",
71  ]
72
73  if (!ringtone_link_opt) {
74    sanitize = {
75      cfi = true
76      cfi_cross_dso = true
77      debug = false
78      integer_overflow = true
79      ubsan = true
80      boundary_sanitize = true
81    }
82  }
83
84  subsystem_name = "multimedia"
85  part_name = "ringtone_library"
86}
87