• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022 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
17ohos_shared_library("rawplugin") {
18  if (!use_clang_android && !use_clang_ios) {
19    sanitize = {
20      cfi = true
21      cfi_cross_dso = true
22      debug = false
23    }
24  }
25  sources = [
26    "//foundation/multimedia/image_framework/plugins/common/libs/image/librawplugin/src/plugin_export.cpp",
27    "//foundation/multimedia/image_framework/plugins/common/libs/image/librawplugin/src/raw_decoder.cpp",
28    "//foundation/multimedia/image_framework/plugins/common/libs/image/librawplugin/src/raw_stream.cpp",
29  ]
30
31  cflags = [
32    "-DIMAGE_DEBUG_FLAG",
33    "-DIMAGE_COLORSPACE_FLAG",
34  ]
35
36  include_dirs = [
37    "//foundation/graphic/graphic_2d/utils/color_manager/export",
38    "//foundation/multimedia/image_framework/frameworks/innerkitsimpl/stream/include",
39    "//foundation/multimedia/image_framework/frameworks/innerkitsimpl/utils/include",
40    "//foundation/multimedia/image_framework/interfaces/innerkits/include",
41    "//foundation/multimedia/image_framework/plugins/common/libs/image/libjpegplugin/include",
42    "//foundation/multimedia/image_framework/plugins/common/libs/image/librawplugin/include",
43    "//foundation/multimedia/image_framework/plugins/manager/include",
44    "//foundation/multimedia/image_framework/plugins/manager/include/image",
45    "//foundation/multimedia/image_framework/plugins/manager/include/pluginbase",
46    "//third_party/libexif",
47    "//third_party/skia",
48    "//third_party/skia/third_party/externals/libjpeg-turbo",
49    "//foundation/graphic/graphic_2d/utils/color_manager/export",
50  ]
51
52  if (use_mingw_win) {
53    defines = image_decode_windows_defines
54    include_dirs +=
55        [ "//foundation/multimedia/image_framework/mock/native/include" ]
56    deps = [
57      "//foundation/multimedia/image_framework/mock/native:log_mock_static",
58      "//foundation/multimedia/image_framework/plugins/manager:pluginmanager_static",
59    ]
60
61    libs = [ "//prebuilts/mingw-w64/ohos/linux-x86_64/clang-mingw/x86_64-w64-mingw32/lib/libws2_32.a" ]
62  } else {
63    defines = [ "DUAL_ADAPTER" ]
64    DUAL_ADAPTER = true
65    deps = [
66      "//foundation/multimedia/image_framework/interfaces/innerkits:image_native",
67      "//foundation/multimedia/image_framework/plugins/common/libs/image/libjpegplugin:jpegplugin",
68      "//foundation/multimedia/image_framework/plugins/manager:pluginmanager",
69      "//third_party/skia/third_party/piex",
70    ]
71
72    if (DUAL_ADAPTER) {
73    }
74
75    external_deps = [
76      "graphic_2d:color_manager",
77      "hilog:libhilog",
78    ]
79  }
80
81  part_name = "image_framework"
82  subsystem_name = "multimedia"
83}
84
85ohos_prebuilt_etc("rawpluginmetadata") {
86  source = "rawplugin.pluginmeta"
87  relative_install_dir = "multimediaplugin/image"
88  subsystem_name = "multimedia"
89  part_name = "image_framework"
90}
91