1# Copyright (C) 2021 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/image_framework/ide/image_decode_config.gni") 16config("log_mock_config") { 17 visibility = [ ":*" ] 18 include_dirs = [ 19 "include", 20 "include/log", 21 ] 22} 23 24ohos_static_library("log_mock_static") { 25 if (!is_arkui_x) { 26 branch_protector_ret = "pac_ret" 27 sanitize = { 28 cfi = true 29 cfi_cross_dso = true 30 cfi_vcall_icall_only = true 31 debug = false 32 } 33 } 34 configs = [ ":log_mock_config" ] 35 sources = [ 36 "//foundation/multimedia/image_framework/mock/native/src/HiLog.cpp", 37 "//foundation/multimedia/image_framework/mock/native/src/hitrace_meter.cpp", 38 ] 39 if (use_clang_ios || use_clang_android) { 40 sources -= [ "$image_subsystem/mock/native/src/HiLog.cpp" ] 41 deps = [ "$graphic_subsystem/rosen/modules/platform:hilog" ] 42 } 43 subsystem_name = "multimedia" 44 part_name = "image_framework" 45} 46 47config("utils_mock_config") { 48 visibility = [ ":*" ] 49 include_dirs = [ 50 "include", 51 "//foundation/multimedia/image_framework/interfaces/innerkits/include", 52 ] 53} 54 55ohos_static_library("utils_mock_static") { 56 if (!is_arkui_x) { 57 sanitize = { 58 cfi = true 59 cfi_cross_dso = true 60 cfi_vcall_icall_only = true 61 debug = false 62 } 63 } 64 65 if (use_mingw_win) { 66 defines = image_decode_windows_defines 67 } else if (use_clang_mac) { 68 defines = image_decode_mac_defines 69 } else if (use_clang_ios) { 70 defines = image_decode_ios_defines 71 } else if (use_clang_android) { 72 defines = image_decode_android_defines 73 } 74 configs = [ ":utils_mock_config" ] 75 sources = [ 76 "//foundation/multimedia/image_framework/mock/native/src/directory_ex.cpp", 77 "//foundation/multimedia/image_framework/mock/native/src/message_parcel.cpp", 78 "//foundation/multimedia/image_framework/mock/native/src/parcel.cpp", 79 "//foundation/multimedia/image_framework/mock/native/src/refbase.cpp", 80 "//foundation/multimedia/image_framework/mock/native/src/rwlock.cpp", 81 ] 82 deps = [ ":log_mock_static" ] 83 subsystem_name = "multimedia" 84 part_name = "image_framework" 85} 86