13e5483f6Sopenharmony_ci# Copyright (C) 2024 Huawei Device Co., Ltd. 23e5483f6Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 33e5483f6Sopenharmony_ci# you may not use this file except in compliance with the License. 43e5483f6Sopenharmony_ci# You may obtain a copy of the License at 53e5483f6Sopenharmony_ci# 63e5483f6Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 73e5483f6Sopenharmony_ci# 83e5483f6Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 93e5483f6Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 103e5483f6Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 113e5483f6Sopenharmony_ci# See the License for the specific language governing permissions and 123e5483f6Sopenharmony_ci# limitations under the License. 133e5483f6Sopenharmony_ci 143e5483f6Sopenharmony_ciimport("//build/ohos.gni") 153e5483f6Sopenharmony_ciimport("//foundation/multimedia/ringtone_library/ringtone_library.gni") 163e5483f6Sopenharmony_ci 173e5483f6Sopenharmony_ciconfig("ringtone_helper_public_config") { 183e5483f6Sopenharmony_ci visibility = [ ":*" ] 193e5483f6Sopenharmony_ci} 203e5483f6Sopenharmony_ci 213e5483f6Sopenharmony_ciohos_shared_library("ringtone_data_helper") { 223e5483f6Sopenharmony_ci branch_protector_ret = "pac_ret" 233e5483f6Sopenharmony_ci install_enable = true 243e5483f6Sopenharmony_ci 253e5483f6Sopenharmony_ci include_dirs = [ 263e5483f6Sopenharmony_ci "${RINGTONE_SCANNER_PATH}/include", 273e5483f6Sopenharmony_ci "${RINGTONE_RESTORE_PATH}/include", 283e5483f6Sopenharmony_ci "${RINGTONE_EXTENSION_PATH}/include", 293e5483f6Sopenharmony_ci "${RINGTONE_DFX_PATH}/include", 303e5483f6Sopenharmony_ci "${RINGTONE_SERVICES_PATH}/utils/include", 313e5483f6Sopenharmony_ci "${RINGTONE_INTERFACES_PATH}/inner_api/native", 323e5483f6Sopenharmony_ci ] 333e5483f6Sopenharmony_ci 343e5483f6Sopenharmony_ci sources = [ 353e5483f6Sopenharmony_ci "src/ringtone_asset.cpp", 363e5483f6Sopenharmony_ci "src/ringtone_fetch_result.cpp", 373e5483f6Sopenharmony_ci "src/simcard_setting_asset.cpp", 383e5483f6Sopenharmony_ci "src/vibrate_asset.cpp", 393e5483f6Sopenharmony_ci ] 403e5483f6Sopenharmony_ci 413e5483f6Sopenharmony_ci public_configs = [ ":ringtone_helper_public_config" ] 423e5483f6Sopenharmony_ci 433e5483f6Sopenharmony_ci cflags = [ 443e5483f6Sopenharmony_ci "-Wall", 453e5483f6Sopenharmony_ci "-Werror", 463e5483f6Sopenharmony_ci "-Wno-unused-but-set-variable", 473e5483f6Sopenharmony_ci "-fdata-sections", 483e5483f6Sopenharmony_ci "-ffunction-sections", 493e5483f6Sopenharmony_ci "-Os", 503e5483f6Sopenharmony_ci ] 513e5483f6Sopenharmony_ci 523e5483f6Sopenharmony_ci cflags_cc = [ 533e5483f6Sopenharmony_ci "-fvisibility-inlines-hidden", 543e5483f6Sopenharmony_ci "-Os", 553e5483f6Sopenharmony_ci ] 563e5483f6Sopenharmony_ci 573e5483f6Sopenharmony_ci external_deps = [ 583e5483f6Sopenharmony_ci "ability_base:zuri", 593e5483f6Sopenharmony_ci "ability_runtime:abilitykit_native", 603e5483f6Sopenharmony_ci "app_file_service:sandbox_helper_native", 613e5483f6Sopenharmony_ci "c_utils:utils", 623e5483f6Sopenharmony_ci "common_event_service:cesfwk_innerkits", 633e5483f6Sopenharmony_ci "data_share:datashare_common", 643e5483f6Sopenharmony_ci "data_share:datashare_consumer", 653e5483f6Sopenharmony_ci "hilog:libhilog", 663e5483f6Sopenharmony_ci "hitrace:hitrace_meter", 673e5483f6Sopenharmony_ci "kv_store:distributeddata_inner", 683e5483f6Sopenharmony_ci "relational_store:native_rdb", 693e5483f6Sopenharmony_ci ] 703e5483f6Sopenharmony_ci 713e5483f6Sopenharmony_ci if (!ringtone_link_opt) { 723e5483f6Sopenharmony_ci sanitize = { 733e5483f6Sopenharmony_ci cfi = true 743e5483f6Sopenharmony_ci cfi_cross_dso = true 753e5483f6Sopenharmony_ci debug = false 763e5483f6Sopenharmony_ci integer_overflow = true 773e5483f6Sopenharmony_ci ubsan = true 783e5483f6Sopenharmony_ci boundary_sanitize = true 793e5483f6Sopenharmony_ci } 803e5483f6Sopenharmony_ci } 813e5483f6Sopenharmony_ci 823e5483f6Sopenharmony_ci subsystem_name = "multimedia" 833e5483f6Sopenharmony_ci part_name = "ringtone_library" 843e5483f6Sopenharmony_ci} 85