blob: 05d6c25222bad2ca390d5ff7e1a8910c977702be [file] [log] [blame]
yujieqin916de9f2016-01-25 08:26:16 -08001# Copyright 2016 Google Inc.
2#
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5# The Adobe DNG SDK, an API for reading and writing DNG files.
6{
adaubert382f8bd2016-01-28 07:56:15 -08007'variables': {
8 'other_cflags': [
9 '-DqDNGBigEndian=0',
10 '-DqDNGReportErrors=0',
11 '-DqDNGThreadSafe=1',
12 '-DqDNGUseLibJPEG=1',
13 '-DqDNGUseXMP=0',
14 '-DqDNGValidate=0',
15 '-DqDNGValidateTarget=1',
16 '-fexceptions',
17 '-frtti',
18 '-w',
19 '-Wframe-larger-than=20000',
20 '-DUNIX_ENV=1',
adaubert382f8bd2016-01-28 07:56:15 -080021 ],
22 'headers': [
23 '../third_party/externals/dng_sdk/source/RawEnvironment.h',
24 '../third_party/externals/dng_sdk/source/dng_1d_function.h',
25 '../third_party/externals/dng_sdk/source/dng_1d_table.h',
26 '../third_party/externals/dng_sdk/source/dng_abort_sniffer.h',
27 '../third_party/externals/dng_sdk/source/dng_area_task.h',
28 '../third_party/externals/dng_sdk/source/dng_assertions.h',
29 '../third_party/externals/dng_sdk/source/dng_auto_ptr.h',
30 '../third_party/externals/dng_sdk/source/dng_bad_pixels.h',
31 '../third_party/externals/dng_sdk/source/dng_bottlenecks.h',
32 '../third_party/externals/dng_sdk/source/dng_camera_profile.h',
33 '../third_party/externals/dng_sdk/source/dng_classes.h',
34 '../third_party/externals/dng_sdk/source/dng_color_space.h',
35 '../third_party/externals/dng_sdk/source/dng_color_spec.h',
36 '../third_party/externals/dng_sdk/source/dng_date_time.h',
37 '../third_party/externals/dng_sdk/source/dng_errors.h',
38 '../third_party/externals/dng_sdk/source/dng_exceptions.h',
39 '../third_party/externals/dng_sdk/source/dng_exif.h',
40 '../third_party/externals/dng_sdk/source/dng_fast_module.h',
41 '../third_party/externals/dng_sdk/source/dng_file_stream.h',
42 '../third_party/externals/dng_sdk/source/dng_filter_task.h',
43 '../third_party/externals/dng_sdk/source/dng_fingerprint.h',
44 '../third_party/externals/dng_sdk/source/dng_flags.h',
45 '../third_party/externals/dng_sdk/source/dng_gain_map.h',
46 '../third_party/externals/dng_sdk/source/dng_globals.h',
47 '../third_party/externals/dng_sdk/source/dng_host.h',
48 '../third_party/externals/dng_sdk/source/dng_hue_sat_map.h',
49 '../third_party/externals/dng_sdk/source/dng_ifd.h',
50 '../third_party/externals/dng_sdk/source/dng_image.h',
51 '../third_party/externals/dng_sdk/source/dng_image_writer.h',
52 '../third_party/externals/dng_sdk/source/dng_info.h',
53 '../third_party/externals/dng_sdk/source/dng_iptc.h',
54 '../third_party/externals/dng_sdk/source/dng_jpeg_image.h',
55 '../third_party/externals/dng_sdk/source/dng_lens_correction.h',
56 '../third_party/externals/dng_sdk/source/dng_linearization_info.h',
57 '../third_party/externals/dng_sdk/source/dng_lossless_jpeg.h',
58 '../third_party/externals/dng_sdk/source/dng_matrix.h',
59 '../third_party/externals/dng_sdk/source/dng_memory.h',
60 '../third_party/externals/dng_sdk/source/dng_memory_stream.h',
61 '../third_party/externals/dng_sdk/source/dng_misc_opcodes.h',
62 '../third_party/externals/dng_sdk/source/dng_mosaic_info.h',
63 '../third_party/externals/dng_sdk/source/dng_mutex.h',
64 '../third_party/externals/dng_sdk/source/dng_negative.h',
65 '../third_party/externals/dng_sdk/source/dng_opcode_list.h',
66 '../third_party/externals/dng_sdk/source/dng_opcodes.h',
67 '../third_party/externals/dng_sdk/source/dng_orientation.h',
68 '../third_party/externals/dng_sdk/source/dng_parse_utils.h',
69 '../third_party/externals/dng_sdk/source/dng_pixel_buffer.h',
70 '../third_party/externals/dng_sdk/source/dng_point.h',
71 '../third_party/externals/dng_sdk/source/dng_preview.h',
72 '../third_party/externals/dng_sdk/source/dng_pthread.h',
73 '../third_party/externals/dng_sdk/source/dng_rational.h',
74 '../third_party/externals/dng_sdk/source/dng_read_image.h',
75 '../third_party/externals/dng_sdk/source/dng_rect.h',
76 '../third_party/externals/dng_sdk/source/dng_ref_counted_block.h',
77 '../third_party/externals/dng_sdk/source/dng_reference.h',
78 '../third_party/externals/dng_sdk/source/dng_render.h',
79 '../third_party/externals/dng_sdk/source/dng_resample.h',
80 '../third_party/externals/dng_sdk/source/dng_sdk_limits.h',
81 '../third_party/externals/dng_sdk/source/dng_shared.h',
82 '../third_party/externals/dng_sdk/source/dng_simple_image.h',
83 '../third_party/externals/dng_sdk/source/dng_spline.h',
84 '../third_party/externals/dng_sdk/source/dng_stream.h',
85 '../third_party/externals/dng_sdk/source/dng_string.h',
86 '../third_party/externals/dng_sdk/source/dng_string_list.h',
87 '../third_party/externals/dng_sdk/source/dng_tag_codes.h',
88 '../third_party/externals/dng_sdk/source/dng_tag_types.h',
89 '../third_party/externals/dng_sdk/source/dng_tag_values.h',
90 '../third_party/externals/dng_sdk/source/dng_temperature.h',
91 '../third_party/externals/dng_sdk/source/dng_tile_iterator.h',
92 '../third_party/externals/dng_sdk/source/dng_tone_curve.h',
93 '../third_party/externals/dng_sdk/source/dng_types.h',
94 '../third_party/externals/dng_sdk/source/dng_uncopyable.h',
95 '../third_party/externals/dng_sdk/source/dng_utils.h',
96 '../third_party/externals/dng_sdk/source/dng_xy_coord.h',
97 '../third_party/externals/dng_sdk/source/dng_jpeg_memory_source.h',
98 '../third_party/externals/dng_sdk/source/dng_jpeglib.h',
99 '../third_party/externals/dng_sdk/source/dng_safe_arithmetic.h',
100 ],
101},
yujieqin916de9f2016-01-25 08:26:16 -0800102'targets': [{
103 'target_name': 'dng_sdk-selector',
104 'type': 'none',
105 'conditions': [
106 [ 'skia_android_framework', {
msarett7869bbf2016-01-25 11:40:02 -0800107 'dependencies': [ 'android_deps.gyp:libdng_sdk' ],
108 'export_dependent_settings': [ 'android_deps.gyp:libdng_sdk' ],
yujieqin916de9f2016-01-25 08:26:16 -0800109 }, {
msarett7869bbf2016-01-25 11:40:02 -0800110 'dependencies': [ 'dng_sdk.gyp:dng_sdk' ],
111 'export_dependent_settings': [ 'dng_sdk.gyp:dng_sdk' ],
yujieqin916de9f2016-01-25 08:26:16 -0800112 }]
113 ]
114},{
115 'target_name': 'dng_sdk',
116 'type': 'static_library',
adaubert382f8bd2016-01-28 07:56:15 -0800117 'cflags_cc!': [ '-fno-rtti' ],
118 'cflags': [ '<@(other_cflags)' ],
119 'conditions': [
120 ['skia_os == "ios" or skia_os == "mac"', {
121 'xcode_settings': {
122 'OTHER_CFLAGS': [ '<@(other_cflags)' ],
123 'OTHER_CPLUSPLUSFLAGS': [ '<@(other_cflags)' ],
124 },
125 }],
yujieqin86e6b552016-02-01 02:56:40 -0800126 ['skia_os == "win"', {
127 'msvs_settings': {
128 'VCCLCompilerTool': {
129 'WarningLevel': '0',
yujieqinf236ee42016-02-29 07:14:42 -0800130 'AdditionalOptions': [
131 '/wd4189',
132 '/DqDNGBigEndian#0',
133 '/DqDNGReportErrors#0',
134 '/DqDNGThreadSafe#1',
135 '/DqDNGUseLibJPEG#1',
136 '/DqDNGUseXMP#0',
137 '/DqDNGValidate#0',
138 '/DqDNGValidateTarget#1',
139 ],
yujieqin86e6b552016-02-01 02:56:40 -0800140 },
141 },
142 }],
adaubert382f8bd2016-01-28 07:56:15 -0800143 ['skia_os != "linux"', {
144 'sources': ['<@(headers)'],
145 }],
mtkleinb4647642016-07-27 05:35:28 -0700146 ['(skia_arch_type == "arm" or skia_arch_type == "x86") and skia_clang_build', {
mtklein98346962016-06-23 11:20:58 -0700147 # DNG SDK uses __builtin_smulll_overflow() to detect 64x64 bit multiply overflow.
mtkleinb4647642016-07-27 05:35:28 -0700148 # On ARMv7 and 32-bit x86, Clang implements this with __mulodi4() in libclang_rt.
mtklein98346962016-06-23 11:20:58 -0700149 # I can't quite figure out how to link that here, so instead here's a shim for
150 # __builtin_smulll_overflow() that multiplies normally assuming no overflow.
151 # Tracked in b/29412086.
152 'defines': [ '__builtin_smulll_overflow(x,y,p)=(*(p)=(x)*(y), false)' ],
153 }],
yujieqin916de9f2016-01-25 08:26:16 -0800154 ],
yujieqin916de9f2016-01-25 08:26:16 -0800155 'dependencies': [
adaubert382f8bd2016-01-28 07:56:15 -0800156 'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector',
157 'zlib.gyp:zlib',
158 ],
159 'include_dirs': [
160 '../third_party/externals/dng_sdk/source',
161 '../third_party/externals/libjpeg-turbo',
yujieqin916de9f2016-01-25 08:26:16 -0800162 ],
163 'direct_dependent_settings': {
164 'include_dirs': [
165 '../third_party/externals/dng_sdk/source',
166 ],
167 },
adaubert382f8bd2016-01-28 07:56:15 -0800168 'sources': [
169 '../third_party/externals/dng_sdk/source/dng_1d_function.cpp',
170 '../third_party/externals/dng_sdk/source/dng_1d_table.cpp',
171 '../third_party/externals/dng_sdk/source/dng_abort_sniffer.cpp',
172 '../third_party/externals/dng_sdk/source/dng_area_task.cpp',
173 '../third_party/externals/dng_sdk/source/dng_bad_pixels.cpp',
174 '../third_party/externals/dng_sdk/source/dng_bottlenecks.cpp',
175 '../third_party/externals/dng_sdk/source/dng_camera_profile.cpp',
176 '../third_party/externals/dng_sdk/source/dng_color_space.cpp',
177 '../third_party/externals/dng_sdk/source/dng_color_spec.cpp',
178 '../third_party/externals/dng_sdk/source/dng_date_time.cpp',
179 '../third_party/externals/dng_sdk/source/dng_exceptions.cpp',
180 '../third_party/externals/dng_sdk/source/dng_exif.cpp',
181 '../third_party/externals/dng_sdk/source/dng_file_stream.cpp',
182 '../third_party/externals/dng_sdk/source/dng_filter_task.cpp',
183 '../third_party/externals/dng_sdk/source/dng_fingerprint.cpp',
184 '../third_party/externals/dng_sdk/source/dng_gain_map.cpp',
185 '../third_party/externals/dng_sdk/source/dng_globals.cpp',
186 '../third_party/externals/dng_sdk/source/dng_host.cpp',
187 '../third_party/externals/dng_sdk/source/dng_hue_sat_map.cpp',
188 '../third_party/externals/dng_sdk/source/dng_ifd.cpp',
189 '../third_party/externals/dng_sdk/source/dng_image.cpp',
190 '../third_party/externals/dng_sdk/source/dng_image_writer.cpp',
191 '../third_party/externals/dng_sdk/source/dng_info.cpp',
192 '../third_party/externals/dng_sdk/source/dng_iptc.cpp',
193 '../third_party/externals/dng_sdk/source/dng_jpeg_image.cpp',
194 '../third_party/externals/dng_sdk/source/dng_lens_correction.cpp',
195 '../third_party/externals/dng_sdk/source/dng_linearization_info.cpp',
196 '../third_party/externals/dng_sdk/source/dng_lossless_jpeg.cpp',
197 '../third_party/externals/dng_sdk/source/dng_matrix.cpp',
198 '../third_party/externals/dng_sdk/source/dng_memory.cpp',
199 '../third_party/externals/dng_sdk/source/dng_memory_stream.cpp',
200 '../third_party/externals/dng_sdk/source/dng_misc_opcodes.cpp',
201 '../third_party/externals/dng_sdk/source/dng_mosaic_info.cpp',
202 '../third_party/externals/dng_sdk/source/dng_mutex.cpp',
203 '../third_party/externals/dng_sdk/source/dng_negative.cpp',
204 '../third_party/externals/dng_sdk/source/dng_opcode_list.cpp',
205 '../third_party/externals/dng_sdk/source/dng_opcodes.cpp',
206 '../third_party/externals/dng_sdk/source/dng_orientation.cpp',
207 '../third_party/externals/dng_sdk/source/dng_parse_utils.cpp',
208 '../third_party/externals/dng_sdk/source/dng_pixel_buffer.cpp',
209 '../third_party/externals/dng_sdk/source/dng_point.cpp',
210 '../third_party/externals/dng_sdk/source/dng_preview.cpp',
211 '../third_party/externals/dng_sdk/source/dng_pthread.cpp',
212 '../third_party/externals/dng_sdk/source/dng_rational.cpp',
213 '../third_party/externals/dng_sdk/source/dng_read_image.cpp',
214 '../third_party/externals/dng_sdk/source/dng_rect.cpp',
215 '../third_party/externals/dng_sdk/source/dng_ref_counted_block.cpp',
216 '../third_party/externals/dng_sdk/source/dng_reference.cpp',
217 '../third_party/externals/dng_sdk/source/dng_render.cpp',
218 '../third_party/externals/dng_sdk/source/dng_resample.cpp',
219 '../third_party/externals/dng_sdk/source/dng_shared.cpp',
220 '../third_party/externals/dng_sdk/source/dng_simple_image.cpp',
221 '../third_party/externals/dng_sdk/source/dng_spline.cpp',
222 '../third_party/externals/dng_sdk/source/dng_stream.cpp',
223 '../third_party/externals/dng_sdk/source/dng_string.cpp',
224 '../third_party/externals/dng_sdk/source/dng_string_list.cpp',
225 '../third_party/externals/dng_sdk/source/dng_tag_types.cpp',
226 '../third_party/externals/dng_sdk/source/dng_temperature.cpp',
227 '../third_party/externals/dng_sdk/source/dng_tile_iterator.cpp',
228 '../third_party/externals/dng_sdk/source/dng_tone_curve.cpp',
229 '../third_party/externals/dng_sdk/source/dng_utils.cpp',
230 '../third_party/externals/dng_sdk/source/dng_xy_coord.cpp',
231 '../third_party/externals/dng_sdk/source/dng_jpeg_memory_source.cpp',
232 '../third_party/externals/dng_sdk/source/dng_safe_arithmetic.cpp',
yujieqin916de9f2016-01-25 08:26:16 -0800233 ],
yujieqin916de9f2016-01-25 08:26:16 -0800234}],
235}