176fd607bSopenharmony_ci# Copyright (C) 2021 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_ciohos_static_library("medialibrary_common_utils") { 1876fd607bSopenharmony_ci include_dirs = [ 1976fd607bSopenharmony_ci "./include/", 2076fd607bSopenharmony_ci "//third_party/openssl/include/", 2176fd607bSopenharmony_ci "${MEDIALIB_INTERFACES_PATH}/inner_api/media_library_helper/include", 2276fd607bSopenharmony_ci ] 2376fd607bSopenharmony_ci 2476fd607bSopenharmony_ci sources = [ "src/medialibrary_common_utils.cpp" ] 2576fd607bSopenharmony_ci 2676fd607bSopenharmony_ci deps = [ "//third_party/openssl:libcrypto_shared" ] 2776fd607bSopenharmony_ci 2876fd607bSopenharmony_ci external_deps = [ 2976fd607bSopenharmony_ci "hilog:libhilog", 3076fd607bSopenharmony_ci "hitrace:hitrace_meter", 3176fd607bSopenharmony_ci ] 3276fd607bSopenharmony_ci defines = [ "OPENSSL_SUPPRESS_DEPRECATED" ] 3376fd607bSopenharmony_ci if (!media_library_link_opt) { 3476fd607bSopenharmony_ci sanitize = { 3576fd607bSopenharmony_ci cfi = true 3676fd607bSopenharmony_ci cfi_cross_dso = true 3776fd607bSopenharmony_ci debug = false 3876fd607bSopenharmony_ci integer_overflow = true 3976fd607bSopenharmony_ci ubsan = true 4076fd607bSopenharmony_ci boundary_sanitize = true 4176fd607bSopenharmony_ci stack_protector_ret = true 4276fd607bSopenharmony_ci } 4376fd607bSopenharmony_ci } 4476fd607bSopenharmony_ci subsystem_name = "multimedia" 4576fd607bSopenharmony_ci part_name = "media_library" 4676fd607bSopenharmony_ci} 4776fd607bSopenharmony_ci 4876fd607bSopenharmony_ciohos_static_library("permission_utils") { 4976fd607bSopenharmony_ci sources = [ "src/permission_utils.cpp" ] 5076fd607bSopenharmony_ci include_dirs = [ 5176fd607bSopenharmony_ci "./include", 5276fd607bSopenharmony_ci "${MEDIALIB_INNERKITS_PATH}/media_library_helper/include", 5376fd607bSopenharmony_ci "${MEDIALIB_INTERFACES_PATH}/inner_api/media_library_helper/include", 5476fd607bSopenharmony_ci 5576fd607bSopenharmony_ci "//third_party/json/include", 5676fd607bSopenharmony_ci ] 5776fd607bSopenharmony_ci 5876fd607bSopenharmony_ci deps = [] 5976fd607bSopenharmony_ci 6076fd607bSopenharmony_ci external_deps = [ 6176fd607bSopenharmony_ci "access_token:el5_filekey_manager_sdk", 6276fd607bSopenharmony_ci "access_token:libaccesstoken_sdk", 6376fd607bSopenharmony_ci "access_token:libprivacy_sdk", 6476fd607bSopenharmony_ci "access_token:libtokenid_sdk", 6576fd607bSopenharmony_ci "bundle_framework:appexecfwk_core", 6676fd607bSopenharmony_ci "hilog:libhilog", 6776fd607bSopenharmony_ci "hitrace:hitrace_meter", 6876fd607bSopenharmony_ci "ipc:ipc_core", 6976fd607bSopenharmony_ci "samgr:samgr_proxy", 7076fd607bSopenharmony_ci ] 7176fd607bSopenharmony_ci if (!media_library_link_opt) { 7276fd607bSopenharmony_ci sanitize = { 7376fd607bSopenharmony_ci cfi = true 7476fd607bSopenharmony_ci cfi_cross_dso = true 7576fd607bSopenharmony_ci debug = false 7676fd607bSopenharmony_ci integer_overflow = true 7776fd607bSopenharmony_ci ubsan = true 7876fd607bSopenharmony_ci boundary_sanitize = true 7976fd607bSopenharmony_ci stack_protector_ret = true 8076fd607bSopenharmony_ci } 8176fd607bSopenharmony_ci } 8276fd607bSopenharmony_ci subsystem_name = "multimedia" 8376fd607bSopenharmony_ci part_name = "media_library" 8476fd607bSopenharmony_ci} 8576fd607bSopenharmony_ci 8676fd607bSopenharmony_ciohos_static_library("post_event_utils") { 8776fd607bSopenharmony_ci include_dirs = [ 8876fd607bSopenharmony_ci "./include/", 8976fd607bSopenharmony_ci "${MEDIALIB_INTERFACES_PATH}/inner_api/media_library_helper/include", 9076fd607bSopenharmony_ci ] 9176fd607bSopenharmony_ci 9276fd607bSopenharmony_ci sources = [ "src/post_event_utils.cpp" ] 9376fd607bSopenharmony_ci 9476fd607bSopenharmony_ci external_deps = [ 9576fd607bSopenharmony_ci "hilog:libhilog", 9676fd607bSopenharmony_ci "hisysevent:libhisysevent", 9776fd607bSopenharmony_ci "ipc:ipc_core", 9876fd607bSopenharmony_ci ] 9976fd607bSopenharmony_ci if (!media_library_link_opt) { 10076fd607bSopenharmony_ci sanitize = { 10176fd607bSopenharmony_ci cfi = true 10276fd607bSopenharmony_ci cfi_cross_dso = true 10376fd607bSopenharmony_ci debug = false 10476fd607bSopenharmony_ci integer_overflow = true 10576fd607bSopenharmony_ci ubsan = true 10676fd607bSopenharmony_ci boundary_sanitize = true 10776fd607bSopenharmony_ci stack_protector_ret = true 10876fd607bSopenharmony_ci } 10976fd607bSopenharmony_ci } 11076fd607bSopenharmony_ci subsystem_name = "multimedia" 11176fd607bSopenharmony_ci part_name = "media_library" 11276fd607bSopenharmony_ci} 113