blob: 51ee97f750c50b560a5adda96fd0334985532a36 [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:*',
msarettb747b902015-11-06 11:15:49 -080020 'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector',
21 'libpng.gyp:libpng',
scroggo6f5e6192015-06-18 12:53:43 -070022 'libwebp.gyp:libwebp',
scroggof24f2242015-03-03 08:59:20 -080023 ],
24 'include_dirs': [
25 '../include/codec',
mtkleincd1f2da2015-07-28 08:55:14 -070026 '../include/private',
scroggof24f2242015-03-03 08:59:20 -080027 '../src/codec',
msarett9bde9182015-03-25 05:27:48 -070028 '../src/core',
msaretta51e7782016-01-12 06:51:11 -080029 '../src/utils',
scroggo19b91532016-10-24 09:03:26 -070030 '../third_party/gif',
scroggof24f2242015-03-03 08:59:20 -080031 ],
32 'sources': [
msarett3d9d7a72015-10-21 10:27:10 -070033 '../src/codec/SkAndroidCodec.cpp',
msarettb46e5e22015-07-30 11:36:40 -070034 '../src/codec/SkBmpCodec.cpp',
msarett4ab9d5f2015-08-06 15:34:42 -070035 '../src/codec/SkBmpMaskCodec.cpp',
36 '../src/codec/SkBmpRLECodec.cpp',
37 '../src/codec/SkBmpStandardCodec.cpp',
scroggof24f2242015-03-03 08:59:20 -080038 '../src/codec/SkCodec.cpp',
msarett1a464672016-01-07 13:17:19 -080039 '../src/codec/SkGifCodec.cpp',
40 '../src/codec/SkIcoCodec.cpp',
msarette16b04a2015-04-15 07:32:19 -070041 '../src/codec/SkJpegCodec.cpp',
42 '../src/codec/SkJpegDecoderMgr.cpp',
msarettc1d03122016-03-25 08:58:55 -070043 '../src/codec/SkJpegUtility.cpp',
msarett74114382015-03-16 11:55:18 -070044 '../src/codec/SkMaskSwizzler.cpp',
45 '../src/codec/SkMasks.cpp',
msarettbe1d5552016-01-21 09:05:23 -080046 '../src/codec/SkPngCodec.cpp',
msarette6dd0042015-10-09 11:07:34 -070047 '../src/codec/SkSampler.cpp',
scroggoa3f792d2015-10-28 14:06:10 -070048 '../src/codec/SkSampledCodec.cpp',
scroggo19b91532016-10-24 09:03:26 -070049 '../src/codec/SkStreamBuffer.cpp',
scroggof24f2242015-03-03 08:59:20 -080050 '../src/codec/SkSwizzler.cpp',
msarett1a464672016-01-07 13:17:19 -080051 '../src/codec/SkWbmpCodec.cpp',
msarett3d9d7a72015-10-21 10:27:10 -070052 '../src/codec/SkWebpAdapterCodec.cpp',
scroggo6f5e6192015-06-18 12:53:43 -070053 '../src/codec/SkWebpCodec.cpp',
msarettedd2dcf2016-01-14 13:12:26 -080054
55 '../src/codec/SkCodecImageGenerator.cpp',
msarett8715d472016-02-17 10:02:29 -080056 '../src/ports/SkImageGenerator_skia.cpp',
scroggo19b91532016-10-24 09:03:26 -070057
scroggo3d3a65c2016-10-24 12:28:30 -070058 '../third_party/gif/SkGifImageReader.cpp',
scroggof24f2242015-03-03 08:59:20 -080059 ],
60 'direct_dependent_settings': {
61 'include_dirs': [
62 '../include/codec',
63 ],
64 },
yujieqin916de9f2016-01-25 08:26:16 -080065 'conditions': [
scroggo1497f9f2016-02-02 11:56:33 -080066 ['skia_codec_decodes_raw', {
yujieqin916de9f2016-01-25 08:26:16 -080067 'dependencies': [
68 'raw_codec',
69 ],
70 },],
71 ],
72 }, {
73 # RAW codec needs exceptions. Due to that, it is a separate target. Its usage can be
scroggo1497f9f2016-02-02 11:56:33 -080074 # controlled by skia_codec_decodes_raw flag.
yujieqin916de9f2016-01-25 08:26:16 -080075 'target_name': 'raw_codec',
76 'product_name': 'raw_codec',
77 'type': 'static_library',
78 'dependencies': [
79 'core.gyp:*',
80 'dng_sdk.gyp:dng_sdk-selector',
81 'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector',
82 'piex.gyp:piex-selector',
83 ],
84 'cflags':[
85 '-fexceptions',
86 ],
yujieqin076d83d2016-01-27 08:25:53 -080087 'msvs_settings': {
88 'VCCLCompilerTool': {
89 # Need this because we are handling exception in SkRawCodec, which will trigger warning
90 # C4530. Add this flag as suggested by the compiler.
91 'AdditionalOptions': ['/EHsc', ],
92 },
93 },
yujieqin916de9f2016-01-25 08:26:16 -080094 'include_dirs': [
95 '../include/codec',
96 '../include/private',
97 '../src/codec',
98 '../src/core',
99 ],
100 'sources': [
101 '../src/codec/SkRawAdapterCodec.cpp',
102 '../src/codec/SkRawCodec.cpp',
103 ],
104 'direct_dependent_settings': {
105 'include_dirs': [
106 '../include/codec',
107 ],
yujieqin916de9f2016-01-25 08:26:16 -0800108 },
yujieqin916de9f2016-01-25 08:26:16 -0800109 'conditions': [
110 ['skia_arch_type == "x86" or skia_arch_type == "arm"', {
111 'defines': [
112 'qDNGBigEndian=0',
113 ],
114 }],
115 ['skia_os == "ios" or skia_os == "mac"', {
116 'xcode_settings': {
117 'OTHER_CFLAGS': ['-fexceptions'],
118 'OTHER_CPLUSPLUSFLAGS': ['-fexceptions'],
119 },
120 }],
121 ],
scroggof24f2242015-03-03 08:59:20 -0800122 },
123 ],
124}