blob: d7272e2a7a9b80f340aa209e1b865151d9fbb09a [file] [log] [blame]
scroggo648ac532015-03-25 07:16:13 -07001# Copyright 2015 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.
scroggo3e562272015-03-25 10:22:41 -07005# Copyright 2015 Google Inc.
6#
7# Use of this source code is governed by a BSD-style license that can be
8# found in the LICENSE file.
scroggo648ac532015-03-25 07:16:13 -07009
scroggof24f2242015-03-03 08:59:20 -080010# GYP file for codec project.
11{
12 'targets': [
13 {
14 'target_name': 'codec',
15 'product_name': 'skia_codec',
16 'type': 'static_library',
17 'standalone_static_library': 1,
18 'dependencies': [
19 'core.gyp:*',
msarett8c8f22a2015-04-01 06:58:48 -070020 'giflib.gyp:giflib',
msarettb747b902015-11-06 11:15:49 -080021 'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector',
22 'libpng.gyp:libpng',
scroggo6f5e6192015-06-18 12:53:43 -070023 'libwebp.gyp:libwebp',
scroggof24f2242015-03-03 08:59:20 -080024 ],
scroggo05245902015-03-25 11:11:52 -070025 'cflags':[
26 # FIXME: This gets around a longjmp warning. See
27 # http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-x86_64-Release-Trybot/builds/113/steps/build%20most/logs/stdio
herb39cbd2b2015-12-09 12:27:31 -080028 '-Wno-clobbered -Wno-error',
scroggo05245902015-03-25 11:11:52 -070029 ],
scroggof24f2242015-03-03 08:59:20 -080030 'include_dirs': [
31 '../include/codec',
mtkleincd1f2da2015-07-28 08:55:14 -070032 '../include/private',
scroggof24f2242015-03-03 08:59:20 -080033 '../src/codec',
msarett9bde9182015-03-25 05:27:48 -070034 '../src/core',
msaretta51e7782016-01-12 06:51:11 -080035 '../src/utils',
scroggof24f2242015-03-03 08:59:20 -080036 ],
37 'sources': [
msarett3d9d7a72015-10-21 10:27:10 -070038 '../src/codec/SkAndroidCodec.cpp',
msarettb46e5e22015-07-30 11:36:40 -070039 '../src/codec/SkBmpCodec.cpp',
msarett4ab9d5f2015-08-06 15:34:42 -070040 '../src/codec/SkBmpMaskCodec.cpp',
41 '../src/codec/SkBmpRLECodec.cpp',
42 '../src/codec/SkBmpStandardCodec.cpp',
scroggof24f2242015-03-03 08:59:20 -080043 '../src/codec/SkCodec.cpp',
msarett1a464672016-01-07 13:17:19 -080044 '../src/codec/SkGifCodec.cpp',
45 '../src/codec/SkIcoCodec.cpp',
msarette16b04a2015-04-15 07:32:19 -070046 '../src/codec/SkJpegCodec.cpp',
47 '../src/codec/SkJpegDecoderMgr.cpp',
mtklein525e90a2015-06-18 09:58:57 -070048 '../src/codec/SkJpegUtility_codec.cpp',
msarett74114382015-03-16 11:55:18 -070049 '../src/codec/SkMaskSwizzler.cpp',
50 '../src/codec/SkMasks.cpp',
msarettbe1d5552016-01-21 09:05:23 -080051 '../src/codec/SkPngCodec.cpp',
msarette6dd0042015-10-09 11:07:34 -070052 '../src/codec/SkSampler.cpp',
scroggoa3f792d2015-10-28 14:06:10 -070053 '../src/codec/SkSampledCodec.cpp',
scroggof24f2242015-03-03 08:59:20 -080054 '../src/codec/SkSwizzler.cpp',
msarett1a464672016-01-07 13:17:19 -080055 '../src/codec/SkWbmpCodec.cpp',
msarett3d9d7a72015-10-21 10:27:10 -070056 '../src/codec/SkWebpAdapterCodec.cpp',
scroggo6f5e6192015-06-18 12:53:43 -070057 '../src/codec/SkWebpCodec.cpp',
msarettedd2dcf2016-01-14 13:12:26 -080058
59 '../src/codec/SkCodecImageGenerator.cpp',
scroggof24f2242015-03-03 08:59:20 -080060 ],
61 'direct_dependent_settings': {
62 'include_dirs': [
63 '../include/codec',
64 ],
65 },
msarettb747b902015-11-06 11:15:49 -080066 'defines': [
67 'TURBO_HAS_SKIP',
68 ],
yujieqin916de9f2016-01-25 08:26:16 -080069 'conditions': [
70 # FIXME: fix the support for Windows. (Issue with _hypot in DNG SDK).
71 ['skia_codec_decodes_raw and skia_os != "win" and skia_os != "chromeos"', {
72 'dependencies': [
73 'raw_codec',
74 ],
75 },],
76 ],
77 }, {
78 # RAW codec needs exceptions. Due to that, it is a separate target. Its usage can be
79 # controlled by SK_CODEC_DECODES_RAW flag.
80 'target_name': 'raw_codec',
81 'product_name': 'raw_codec',
82 'type': 'static_library',
83 'dependencies': [
84 'core.gyp:*',
85 'dng_sdk.gyp:dng_sdk-selector',
86 'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector',
87 'piex.gyp:piex-selector',
88 ],
89 'cflags':[
90 '-fexceptions',
91 ],
92 'include_dirs': [
93 '../include/codec',
94 '../include/private',
95 '../src/codec',
96 '../src/core',
97 ],
98 'sources': [
99 '../src/codec/SkRawAdapterCodec.cpp',
100 '../src/codec/SkRawCodec.cpp',
101 ],
102 'direct_dependent_settings': {
103 'include_dirs': [
104 '../include/codec',
105 ],
106 'defines': [
107 'SK_CODEC_DECODES_RAW',
108 ],
109 },
110 'defines': [
111 'SK_CODEC_DECODES_RAW',
112 ],
113 'conditions': [
114 ['skia_arch_type == "x86" or skia_arch_type == "arm"', {
115 'defines': [
116 'qDNGBigEndian=0',
117 ],
118 }],
119 ['skia_os == "ios" or skia_os == "mac"', {
120 'xcode_settings': {
121 'OTHER_CFLAGS': ['-fexceptions'],
122 'OTHER_CPLUSPLUSFLAGS': ['-fexceptions'],
123 },
124 }],
125 ],
scroggof24f2242015-03-03 08:59:20 -0800126 },
127 ],
128}