176fd607bSopenharmony_ci# Copyright (C) 2024 Huawei Device Co., Ltd. 276fd607bSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 376fd607bSopenharmony_ci# you may not use this file except in compliance with the License. 476fd607bSopenharmony_ci# You may obtain a copy of the License at 576fd607bSopenharmony_ci# 676fd607bSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 776fd607bSopenharmony_ci# 876fd607bSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 976fd607bSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1076fd607bSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1176fd607bSopenharmony_ci# See the License for the specific language governing permissions and 1276fd607bSopenharmony_ci# limitations under the License. 1376fd607bSopenharmony_ci 1476fd607bSopenharmony_ciimport("//build/ohos.gni") 1576fd607bSopenharmony_ciimport("//foundation/multimedia/media_library/media_library.gni") 1676fd607bSopenharmony_ci 1776fd607bSopenharmony_ciconfig("media_capi_config") { 1876fd607bSopenharmony_ci include_dirs = [ 1976fd607bSopenharmony_ci "${MEDIALIB_INTERFACES_PATH}/inner_api/media_library_helper/include", 2076fd607bSopenharmony_ci "${MEDIALIB_INTERFACES_PATH}/kits/c", 2176fd607bSopenharmony_ci "${MEDIALIB_ROOT_PATH}/frameworks/native/c_api/common", 2276fd607bSopenharmony_ci ] 2376fd607bSopenharmony_ci 2476fd607bSopenharmony_ci cflags = [ 2576fd607bSopenharmony_ci "-Wall", 2676fd607bSopenharmony_ci "-Werror", 2776fd607bSopenharmony_ci "-Wno-unused-but-set-variable", 2876fd607bSopenharmony_ci "-fdata-sections", 2976fd607bSopenharmony_ci "-ffunction-sections", 3076fd607bSopenharmony_ci "-Os", 3176fd607bSopenharmony_ci ] 3276fd607bSopenharmony_ci 3376fd607bSopenharmony_ci cflags_cc = [ 3476fd607bSopenharmony_ci "-std=c++17", 3576fd607bSopenharmony_ci "-fno-rtti", 3676fd607bSopenharmony_ci ] 3776fd607bSopenharmony_ci} 3876fd607bSopenharmony_ci 3976fd607bSopenharmony_ciconfig("media_capi_public_config") { 4076fd607bSopenharmony_ci include_dirs = [ 4176fd607bSopenharmony_ci "${MEDIALIB_INTERFACES_PATH}/kits/c", 4276fd607bSopenharmony_ci "${MEDIALIB_ROOT_PATH}/frameworks/native/capi/common", 4376fd607bSopenharmony_ci ] 4476fd607bSopenharmony_ci} 4576fd607bSopenharmony_ci 4676fd607bSopenharmony_ciohos_shared_library("native_media_asset_manager") { 4776fd607bSopenharmony_ci install_enable = true 4876fd607bSopenharmony_ci 4976fd607bSopenharmony_ci if (!media_library_link_opt) { 5076fd607bSopenharmony_ci sanitize = { 5176fd607bSopenharmony_ci cfi = true 5276fd607bSopenharmony_ci cfi_cross_dso = true 5376fd607bSopenharmony_ci debug = false 5476fd607bSopenharmony_ci integer_overflow = true 5576fd607bSopenharmony_ci ubsan = true 5676fd607bSopenharmony_ci boundary_sanitize = true 5776fd607bSopenharmony_ci stack_protector_ret = true 5876fd607bSopenharmony_ci } 5976fd607bSopenharmony_ci } 6076fd607bSopenharmony_ci 6176fd607bSopenharmony_ci sources = [ 6276fd607bSopenharmony_ci "${MEDIALIB_NATIVE_PATH}/c_api/media_access_helper_capi/media_access_helper_capi.cpp", 6376fd607bSopenharmony_ci "${MEDIALIB_NATIVE_PATH}/c_api/media_asset_capi/media_asset_capi.cpp", 6476fd607bSopenharmony_ci "${MEDIALIB_NATIVE_PATH}/c_api/media_asset_change_request_capi/media_asset_change_request_capi.cpp", 6576fd607bSopenharmony_ci "${MEDIALIB_NATIVE_PATH}/c_api/moving_photo_capi/moving_photo_capi.cpp", 6676fd607bSopenharmony_ci "${MEDIALIB_ROOT_PATH}/frameworks/native/c_api/media_asset_manger_capi/media_asset_manager_capi.cpp", 6776fd607bSopenharmony_ci ] 6876fd607bSopenharmony_ci 6976fd607bSopenharmony_ci configs = [ ":media_capi_config" ] 7076fd607bSopenharmony_ci 7176fd607bSopenharmony_ci deps = [ 7276fd607bSopenharmony_ci "${MEDIALIB_INNERKITS_PATH}/media_library_helper:media_library", 7376fd607bSopenharmony_ci "${MEDIALIB_NATIVE_PATH}/media_library_asset_manager:media_library_asset_manager", 7476fd607bSopenharmony_ci ] 7576fd607bSopenharmony_ci 7676fd607bSopenharmony_ci public_configs = [ ":media_capi_public_config" ] 7776fd607bSopenharmony_ci 7876fd607bSopenharmony_ci external_deps = [ 7976fd607bSopenharmony_ci "c_utils:utils", 8076fd607bSopenharmony_ci "data_share:datashare_common", 8176fd607bSopenharmony_ci "data_share:datashare_consumer", 8276fd607bSopenharmony_ci "hilog:libhilog", 8376fd607bSopenharmony_ci "image_framework:ohimage", 8476fd607bSopenharmony_ci "napi:ace_napi", 8576fd607bSopenharmony_ci "resource_management:librawfile", 8676fd607bSopenharmony_ci ] 8776fd607bSopenharmony_ci output_name = "media_asset_manager" 8876fd607bSopenharmony_ci output_extension = "so" 8976fd607bSopenharmony_ci innerapi_tags = [ "ndk" ] 9076fd607bSopenharmony_ci subsystem_name = "multimedia" 9176fd607bSopenharmony_ci part_name = "media_library" 9276fd607bSopenharmony_ci} 93