• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    if (is_arkui_x) {
42      sources -= [ "$image_subsystem/mock/native/src/hitrace_meter.cpp" ]
43    }
44    deps = [ "$graphic_subsystem/rosen/modules/platform:hilog" ]
45  }
46  subsystem_name = "multimedia"
47  part_name = "image_framework"
48}
49
50config("utils_mock_config") {
51  visibility = [ ":*" ]
52  include_dirs = [
53    "include",
54    "//foundation/multimedia/image_framework/interfaces/innerkits/include",
55  ]
56}
57
58ohos_static_library("utils_mock_static") {
59  if (!is_arkui_x) {
60    sanitize = {
61      cfi = true
62      cfi_cross_dso = true
63      cfi_vcall_icall_only = true
64      debug = false
65    }
66  }
67
68  if (use_mingw_win) {
69    defines = image_decode_windows_defines
70  } else if (use_clang_mac) {
71    defines = image_decode_mac_defines
72  } else if (use_clang_ios) {
73    defines = image_decode_ios_defines
74  } else if (use_clang_android) {
75    defines = image_decode_android_defines
76  }
77  configs = [ ":utils_mock_config" ]
78  sources = [
79    "//foundation/multimedia/image_framework/mock/native/src/directory_ex.cpp",
80    "//foundation/multimedia/image_framework/mock/native/src/message_parcel.cpp",
81    "//foundation/multimedia/image_framework/mock/native/src/parcel.cpp",
82    "//foundation/multimedia/image_framework/mock/native/src/refbase.cpp",
83    "//foundation/multimedia/image_framework/mock/native/src/rwlock.cpp",
84  ]
85  deps = [ ":log_mock_static" ]
86  subsystem_name = "multimedia"
87  part_name = "image_framework"
88}
89