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") 16 17config("pixelconvertadapter_public_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ 20 "//foundation/multimedia/utils/include", 21 "//foundation/multimedia/image_framework/interfaces/innerkits/include", 22 "//foundation/multimedia/image_framework/frameworks/innerkitsimpl/pixelconverter/include", 23 "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", 24 "//foundation/communication/ipc/utils/include", 25 "//foundation/multimedia/media_utils_lite/interfaces/kits", 26 "${image_subsystem}/frameworks/innerkitsimpl/utils/include", 27 "$skia_root/skia/include/core", 28 "$skia_root/skia/include/encode", 29 "$skia_root/skia", 30 "$skia_root/skia/src/ports/skia_ohos", 31 "$skia_root/skia/src/ports", 32 "$skia_root/skia/src/images", 33 "$skia_root/skia/src/ports/skia_ohos", 34 "$skia_root/skia/third_party/externals/freetype/include/freetype", 35 "$skia_root/skia/include/private", 36 "//third_party/bounds_checking_function/include", 37 ] 38 39 if (use_mingw_win) { 40 include_dirs += [ 41 "//foundation/multimedia/image_framework/mock/native/include", 42 "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", 43 "//foundation/communication/ipc/utils/include", 44 "$skia_root/skia/include/core", 45 "$skia_root/skia/include/encode", 46 "$skia_root/skia", 47 "$skia_root/skia/src/ports/skia_ohos", 48 "$skia_root/skia/src/ports", 49 "$skia_root/skia/src/images", 50 "$skia_root/skia/src/ports/skia_ohos", 51 "$skia_root/skia/third_party/externals/freetype/include/freetype", 52 "//third_party/bounds_checking_function/include", 53 ] 54 } else if (use_clang_mac) { 55 include_dirs += [ 56 "//foundation/multimedia/image_framework/mock/native/include", 57 "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", 58 "$skia_root/skia/include/core", 59 "$skia_root/skia/include/encode", 60 "$skia_root/skia", 61 "$skia_root/skia/src/ports/skia_ohos", 62 "$skia_root/skia/src/ports", 63 "$skia_root/skia/src/images", 64 "$skia_root/skia/src/ports/skia_ohos", 65 "$skia_root/skia/third_party/externals/freetype/include/freetype", 66 "//third_party/bounds_checking_function/include", 67 ] 68 } else if (use_clang_ios) { 69 include_dirs += [ 70 "//commonlibrary/c_utils/base/include", 71 "//foundation/communication/ipc/utils/include", 72 "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", 73 "$skia_root/skia/include/core", 74 "$skia_root/skia/include/encode", 75 "$skia_root/skia", 76 "$skia_root/skia/src/ports/skia_ohos", 77 "$skia_root/skia/src/ports", 78 "$skia_root/skia/src/images", 79 "//third_party/expat/lib", 80 "$skia_root/skia/include/private", 81 "$skia_root/skia/third_party/externals/freetype/include/freetype", 82 "//third_party/bounds_checking_function/include", 83 "$image_subsystem/mock/native/include/log", 84 ] 85 } else if (use_clang_android) { 86 include_dirs += [ 87 "//commonlibrary/c_utils/base/include", 88 "//foundation/communication/ipc/utils/include", 89 "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", 90 "$skia_root/skia/include/core", 91 "$skia_root/skia/include/encode", 92 "$skia_root/skia", 93 "$skia_root/skia/src/ports/skia_ohos", 94 "$skia_root/skia/src/ports", 95 "$skia_root/skia/src/images", 96 "//third_party/expat/lib", 97 "$skia_root/skia/include/private", 98 "$skia_root/skia/third_party/externals/freetype/include/freetype", 99 "//third_party/bounds_checking_function/include", 100 "$image_subsystem/mock/native/include/log", 101 ] 102 } else { 103 include_dirs += [ 104 "//commonlibrary/c_utils/base/include", 105 "//foundation/communication/ipc/utils/include", 106 "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", 107 "$skia_root/skia/include/core", 108 "$skia_root/skia/include/encode", 109 "$skia_root/skia", 110 "$skia_root/skia/src/ports/skia_ohos", 111 "$skia_root/skia/src/ports", 112 "$skia_root/skia/src/images", 113 "//third_party/expat/lib", 114 "$skia_root/skia/include/private", 115 "$skia_root/skia/third_party/externals/freetype/include/freetype", 116 "//third_party/bounds_checking_function/include", 117 ] 118 } 119} 120 121if (use_clang_ios) { 122 ohos_source_set("pixelconvertadapter") { 123 sources = [ "//foundation/multimedia/image_framework/frameworks/innerkitsimpl/pixelconverter/src/pixel_convert_adapter.cpp" ] 124 125 public_configs = [ ":pixelconvertadapter_public_config" ] 126 127 defines = image_decode_ios_defines 128 deps = [ 129 "//foundation/multimedia/image_framework/mock/native:log_mock_static", 130 ] 131 deps += skia_platform 132 133 #relative_install_dir = "module/multimedia" 134 subsystem_name = "multimedia" 135 part_name = "image_framework" 136 } 137} else { 138 ohos_shared_library("pixelconvertadapter") { 139 if (!use_clang_android) { 140 sanitize = { 141 cfi = true 142 cfi_cross_dso = true 143 debug = false 144 } 145 } 146 sources = [ "//foundation/multimedia/image_framework/frameworks/innerkitsimpl/pixelconverter/src/pixel_convert_adapter.cpp" ] 147 148 public_configs = [ ":pixelconvertadapter_public_config" ] 149 150 if (use_mingw_win) { 151 defines = image_decode_windows_defines 152 deps = [ 153 "//foundation/multimedia/image_framework/mock/native:log_mock_static", 154 ] 155 deps += skia_platform 156 } else if (use_clang_mac) { 157 defines = image_decode_mac_defines 158 deps = [ 159 "//foundation/multimedia/image_framework/mock/native:log_mock_static", 160 ] 161 deps += skia_platform 162 } else if (use_clang_android) { 163 deps = [ 164 "//foundation/graphic/graphic_2d/utils/color_manager:color_manager", 165 "//foundation/multimedia/image_framework/mock/native:log_mock_static", 166 ] 167 168 libs = [ "nativewindow" ] 169 } else { 170 deps = [ 171 "//foundation/multimedia/image_framework/mock/native:log_mock_static", 172 ] 173 deps += skia_platform 174 external_deps = [ 175 "c_utils:utils", 176 "graphic_2d:color_manager", 177 "hilog:libhilog", 178 ] 179 } 180 181 #relative_install_dir = "module/multimedia" 182 subsystem_name = "multimedia" 183 innerapi_tags = [ "platformsdk" ] 184 part_name = "image_framework" 185 } 186} 187 188ohos_static_library("pixelconvertadapter_static") { 189 sources = [ "//foundation/multimedia/image_framework/frameworks/innerkitsimpl/pixelconverter/src/pixel_convert_adapter.cpp" ] 190 public_configs = [ ":pixelconvertadapter_public_config" ] 191 192 if (use_mingw_win) { 193 defines = image_decode_windows_defines 194 deps = [ 195 "//foundation/multimedia/image_framework/mock/native:log_mock_static", 196 ] 197 deps += skia_platform 198 } else if (use_clang_mac) { 199 defines = image_decode_mac_defines 200 deps = [ 201 "//foundation/multimedia/image_framework/mock/native:log_mock_static", 202 ] 203 deps += skia_platform 204 } else if (use_clang_ios) { 205 defines = image_decode_ios_defines 206 deps = [ 207 "//foundation/graphic/graphic_2d/utils/color_manager:color_manager", 208 "//foundation/multimedia/image_framework/mock/native:log_mock_static", 209 ] 210 deps += skia_platform 211 } else if (use_clang_android) { 212 deps = [ 213 "//foundation/graphic/graphic_2d/utils/color_manager:color_manager", 214 "//foundation/multimedia/image_framework/mock/native:log_mock_static", 215 ] 216 deps += skia_platform 217 218 libs = [ "nativewindow" ] 219 } else { 220 deps = [ 221 "//foundation/multimedia/image_framework/mock/native:log_mock_static", 222 ] 223 deps += skia_platform 224 225 external_deps = [ 226 "c_utils:utils", 227 "hilog:libhilog", 228 ] 229 } 230 subsystem_name = "multimedia" 231 part_name = "image_framework" 232} 233