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
17SEPARATOR = "/"
18BASE_DIR = "$SEPARATOR/foundation"
19
20config("native_public_config") {
21  include_dirs = [
22    "include",
23    "$BASE_DIR/multimedia/image_framework/interfaces/kits/native/include",
24    "$BASE_DIR/multimedia/image_framework/interfaces/kits/native/include/image",
25    "$BASE_DIR/multimedia/image_framework/interfaces/innerkits/include",
26    "$BASE_DIR/multimedia/image_framework/frameworks/kits/js/common/pixelmap_ndk",
27    "$BASE_DIR/multimedia/image_framework/frameworks/kits/js/common/picture_ndk",
28  ]
29}
30
31ohos_shared_library("image_ndk") {
32  sanitize = {
33    cfi = true
34    cfi_cross_dso = true
35    cfi_vcall_icall_only = true
36    debug = false
37  }
38
39  sources = [ "image_mdk.cpp" ]
40  public_configs = [ ":native_public_config" ]
41  deps = [ "$image_subsystem/interfaces/kits/js/common:image" ]
42  external_deps = [
43    "c_utils:utils",
44    "graphic_surface:surface",
45    "ipc:ipc_single",
46    "napi:ace_napi",
47  ]
48
49  innerapi_tags = [ "ndk" ]
50  subsystem_name = "multimedia"
51  part_name = "image_framework"
52}
53
54ohos_shared_library("image_receiver_ndk") {
55  sanitize = {
56    cfi = true
57    cfi_cross_dso = true
58    cfi_vcall_icall_only = true
59    debug = false
60  }
61
62  sources = [ "image_receiver_mdk.cpp" ]
63  public_configs = [ ":native_public_config" ]
64  deps = [ "$image_subsystem/interfaces/kits/js/common:image" ]
65  external_deps = [
66    "c_utils:utils",
67    "drivers_peripheral_display:hdi_gralloc_client",
68    "graphic_2d:color_manager",
69    "graphic_surface:surface",
70    "ipc:ipc_single",
71    "napi:ace_napi",
72  ]
73
74  innerapi_tags = [ "ndk" ]
75  subsystem_name = "multimedia"
76  part_name = "image_framework"
77}
78
79ohos_shared_library("image_source_ndk") {
80  sanitize = {
81    cfi = true
82    cfi_cross_dso = true
83    cfi_vcall_icall_only = true
84    debug = false
85  }
86
87  sources = [ "image_source_mdk.cpp" ]
88  public_configs = [ ":native_public_config" ]
89  deps = [ "$image_subsystem/interfaces/kits/js/common:image" ]
90
91  external_deps = [
92    "c_utils:utils",
93    "napi:ace_napi",
94    "resource_management:librawfile",
95  ]
96
97  innerapi_tags = [ "ndk" ]
98  subsystem_name = "multimedia"
99  part_name = "image_framework"
100}
101
102ohos_shared_library("image_packer_ndk") {
103  sanitize = {
104    cfi = true
105    cfi_cross_dso = true
106    cfi_vcall_icall_only = true
107    debug = false
108  }
109
110  sources = [ "image_packer_mdk.cpp" ]
111  public_configs = [ ":native_public_config" ]
112  deps = [ "$image_subsystem/interfaces/kits/js/common:image" ]
113
114  external_deps = [
115    "c_utils:utils",
116    "napi:ace_napi",
117  ]
118
119  innerapi_tags = [ "ndk" ]
120  subsystem_name = "multimedia"
121  part_name = "image_framework"
122}
123
124ohos_shared_library("image_source") {
125  output_extension = "so"
126  sanitize = {
127    cfi = true
128    cfi_cross_dso = true
129    cfi_vcall_icall_only = true
130    debug = false
131  }
132
133  sources = [
134    "image_source_native.cpp",
135    "image_source_native_impl.cpp",
136  ]
137
138  include_dirs = [
139    "include",
140    "$BASE_DIR/multimedia/image_framework/interfaces/kits/native/include",
141    "$BASE_DIR/multimedia/image_framework/interfaces/kits/native/include/image",
142    "$BASE_DIR/multimedia/image_framework/interfaces/innerkits/include",
143    "$BASE_DIR/multimedia/image_framework/frameworks/kits/js/common/pixelmap_ndk",
144    "$BASE_DIR/multimedia/image_framework/frameworks/kits/js/common/picture_ndk/include",
145    "$BASE_DIR/multimedia/image_framework/frameworks/innerkitsimpl/utils/include",
146  ]
147
148  deps = [
149    "$image_subsystem/frameworks/innerkitsimpl/utils:image_utils",
150    "$image_subsystem/frameworks/kits/js/common/picture_ndk:picture",
151    "$image_subsystem/frameworks/kits/js/common/pixelmap_ndk:pixelmap",
152    "$image_subsystem/interfaces/innerkits:image_native",
153    "$image_subsystem/interfaces/kits/js/common:image",
154  ]
155
156  external_deps = [
157    "c_utils:utils",
158    "napi:ace_napi",
159    "resource_management:librawfile",
160  ]
161
162  innerapi_tags = [ "ndk" ]
163  subsystem_name = "multimedia"
164  part_name = "image_framework"
165}
166
167ohos_shared_library("image_packer") {
168  output_extension = "so"
169  sanitize = {
170    cfi = true
171    cfi_cross_dso = true
172    cfi_vcall_icall_only = true
173    debug = false
174  }
175
176  sources = [
177    "image_packer_native.cpp",
178    "image_packer_native_impl.cpp",
179  ]
180
181  include_dirs = [
182    "include",
183    "$BASE_DIR/multimedia/image_framework/interfaces/kits/native/include",
184    "$BASE_DIR/multimedia/image_framework/interfaces/kits/native/include/image",
185    "$BASE_DIR/multimedia/image_framework/interfaces/innerkits/include",
186    "$BASE_DIR/multimedia/image_framework/frameworks/kits/js/common/pixelmap_ndk",
187    "$BASE_DIR/multimedia/image_framework/frameworks/kits/js/common/picture_ndk/include",
188  ]
189
190  deps = [
191    "$image_subsystem/frameworks/kits/js/common/ndk:image_source",
192    "$image_subsystem/frameworks/kits/js/common/picture_ndk:picture",
193    "$image_subsystem/frameworks/kits/js/common/pixelmap_ndk:pixelmap",
194    "$image_subsystem/interfaces/innerkits:image_native",
195    "$image_subsystem/interfaces/kits/js/common:image",
196  ]
197
198  external_deps = [
199    "c_utils:utils",
200    "napi:ace_napi",
201    "resource_management:librawfile",
202  ]
203
204  innerapi_tags = [ "ndk" ]
205  subsystem_name = "multimedia"
206  part_name = "image_framework"
207}
208