scroggo | 648ac53 | 2015-03-25 07:16:13 -0700 | [diff] [blame] | 1 | # 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. |
scroggo | 3e56227 | 2015-03-25 10:22:41 -0700 | [diff] [blame] | 5 | # 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. |
scroggo | 648ac53 | 2015-03-25 07:16:13 -0700 | [diff] [blame] | 9 | |
scroggo | f24f224 | 2015-03-03 08:59:20 -0800 | [diff] [blame] | 10 | # 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:*', |
msarett | 8c8f22a | 2015-04-01 06:58:48 -0700 | [diff] [blame] | 20 | 'giflib.gyp:giflib', |
msarett | b747b90 | 2015-11-06 11:15:49 -0800 | [diff] [blame] | 21 | 'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector', |
| 22 | 'libpng.gyp:libpng', |
scroggo | 6f5e619 | 2015-06-18 12:53:43 -0700 | [diff] [blame] | 23 | 'libwebp.gyp:libwebp', |
scroggo | f24f224 | 2015-03-03 08:59:20 -0800 | [diff] [blame] | 24 | ], |
msarett | 39b2d5a | 2016-02-17 08:26:31 -0800 | [diff] [blame] | 25 | 'cflags':[ |
| 26 | # FIXME: This gets around a warning: "Argument might be clobbered by longjmp". |
djsollen | f9deeb6 | 2016-03-07 12:30:47 -0800 | [diff] [blame] | 27 | '-Wno-clobbered -Wno-error', |
scroggo | 0524590 | 2015-03-25 11:11:52 -0700 | [diff] [blame] | 28 | ], |
scroggo | f24f224 | 2015-03-03 08:59:20 -0800 | [diff] [blame] | 29 | 'include_dirs': [ |
| 30 | '../include/codec', |
mtklein | cd1f2da | 2015-07-28 08:55:14 -0700 | [diff] [blame] | 31 | '../include/private', |
scroggo | f24f224 | 2015-03-03 08:59:20 -0800 | [diff] [blame] | 32 | '../src/codec', |
msarett | 9bde918 | 2015-03-25 05:27:48 -0700 | [diff] [blame] | 33 | '../src/core', |
msarett | a51e778 | 2016-01-12 06:51:11 -0800 | [diff] [blame] | 34 | '../src/utils', |
scroggo | f24f224 | 2015-03-03 08:59:20 -0800 | [diff] [blame] | 35 | ], |
| 36 | 'sources': [ |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 37 | '../src/codec/SkAndroidCodec.cpp', |
msarett | b46e5e2 | 2015-07-30 11:36:40 -0700 | [diff] [blame] | 38 | '../src/codec/SkBmpCodec.cpp', |
msarett | 4ab9d5f | 2015-08-06 15:34:42 -0700 | [diff] [blame] | 39 | '../src/codec/SkBmpMaskCodec.cpp', |
| 40 | '../src/codec/SkBmpRLECodec.cpp', |
| 41 | '../src/codec/SkBmpStandardCodec.cpp', |
scroggo | f24f224 | 2015-03-03 08:59:20 -0800 | [diff] [blame] | 42 | '../src/codec/SkCodec.cpp', |
msarett | 1a46467 | 2016-01-07 13:17:19 -0800 | [diff] [blame] | 43 | '../src/codec/SkGifCodec.cpp', |
| 44 | '../src/codec/SkIcoCodec.cpp', |
msarett | e16b04a | 2015-04-15 07:32:19 -0700 | [diff] [blame] | 45 | '../src/codec/SkJpegCodec.cpp', |
| 46 | '../src/codec/SkJpegDecoderMgr.cpp', |
mtklein | 525e90a | 2015-06-18 09:58:57 -0700 | [diff] [blame] | 47 | '../src/codec/SkJpegUtility_codec.cpp', |
msarett | 7411438 | 2015-03-16 11:55:18 -0700 | [diff] [blame] | 48 | '../src/codec/SkMaskSwizzler.cpp', |
| 49 | '../src/codec/SkMasks.cpp', |
msarett | be1d555 | 2016-01-21 09:05:23 -0800 | [diff] [blame] | 50 | '../src/codec/SkPngCodec.cpp', |
msarett | e6dd004 | 2015-10-09 11:07:34 -0700 | [diff] [blame] | 51 | '../src/codec/SkSampler.cpp', |
scroggo | a3f792d | 2015-10-28 14:06:10 -0700 | [diff] [blame] | 52 | '../src/codec/SkSampledCodec.cpp', |
scroggo | f24f224 | 2015-03-03 08:59:20 -0800 | [diff] [blame] | 53 | '../src/codec/SkSwizzler.cpp', |
msarett | 1a46467 | 2016-01-07 13:17:19 -0800 | [diff] [blame] | 54 | '../src/codec/SkWbmpCodec.cpp', |
msarett | 3d9d7a7 | 2015-10-21 10:27:10 -0700 | [diff] [blame] | 55 | '../src/codec/SkWebpAdapterCodec.cpp', |
scroggo | 6f5e619 | 2015-06-18 12:53:43 -0700 | [diff] [blame] | 56 | '../src/codec/SkWebpCodec.cpp', |
msarett | edd2dcf | 2016-01-14 13:12:26 -0800 | [diff] [blame] | 57 | |
| 58 | '../src/codec/SkCodecImageGenerator.cpp', |
msarett | 8715d47 | 2016-02-17 10:02:29 -0800 | [diff] [blame] | 59 | '../src/ports/SkImageGenerator_skia.cpp', |
scroggo | f24f224 | 2015-03-03 08:59:20 -0800 | [diff] [blame] | 60 | ], |
| 61 | 'direct_dependent_settings': { |
| 62 | 'include_dirs': [ |
| 63 | '../include/codec', |
| 64 | ], |
| 65 | }, |
msarett | b747b90 | 2015-11-06 11:15:49 -0800 | [diff] [blame] | 66 | 'defines': [ |
msarett | 39b2d5a | 2016-02-17 08:26:31 -0800 | [diff] [blame] | 67 | # Turn on all of the codecs, since we know that we have all of the |
| 68 | # necessary dependencies. Clients that are missing some of the |
| 69 | # required decoding libraries may choose to turn the codecs on or |
| 70 | # off individually. |
| 71 | 'SK_CODEC_DECODES_GIF', |
| 72 | 'SK_CODEC_DECODES_JPEG', |
| 73 | 'SK_CODEC_DECODES_PNG', |
| 74 | 'SK_CODEC_DECODES_WEBP', |
| 75 | |
| 76 | # Turn on libjpeg-turbo optimizations since we know that the |
msarett | 285e7c6 | 2016-02-23 05:48:01 -0800 | [diff] [blame] | 77 | # appropriate version of libjpeg-turbo is present. |
| 78 | 'TURBO_HAS_CROP', |
msarett | b747b90 | 2015-11-06 11:15:49 -0800 | [diff] [blame] | 79 | 'TURBO_HAS_SKIP', |
msarett | 70e418b | 2016-02-12 12:35:48 -0800 | [diff] [blame] | 80 | 'TURBO_HAS_565', |
msarett | b747b90 | 2015-11-06 11:15:49 -0800 | [diff] [blame] | 81 | ], |
yujieqin | 916de9f | 2016-01-25 08:26:16 -0800 | [diff] [blame] | 82 | 'conditions': [ |
scroggo | 1497f9f | 2016-02-02 11:56:33 -0800 | [diff] [blame] | 83 | ['skia_codec_decodes_raw', { |
yujieqin | 916de9f | 2016-01-25 08:26:16 -0800 | [diff] [blame] | 84 | 'dependencies': [ |
| 85 | 'raw_codec', |
| 86 | ], |
| 87 | },], |
| 88 | ], |
| 89 | }, { |
| 90 | # RAW codec needs exceptions. Due to that, it is a separate target. Its usage can be |
scroggo | 1497f9f | 2016-02-02 11:56:33 -0800 | [diff] [blame] | 91 | # controlled by skia_codec_decodes_raw flag. |
yujieqin | 916de9f | 2016-01-25 08:26:16 -0800 | [diff] [blame] | 92 | 'target_name': 'raw_codec', |
| 93 | 'product_name': 'raw_codec', |
| 94 | 'type': 'static_library', |
| 95 | 'dependencies': [ |
| 96 | 'core.gyp:*', |
| 97 | 'dng_sdk.gyp:dng_sdk-selector', |
| 98 | 'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector', |
| 99 | 'piex.gyp:piex-selector', |
| 100 | ], |
| 101 | 'cflags':[ |
| 102 | '-fexceptions', |
| 103 | ], |
yujieqin | 076d83d | 2016-01-27 08:25:53 -0800 | [diff] [blame] | 104 | 'msvs_settings': { |
| 105 | 'VCCLCompilerTool': { |
| 106 | # Need this because we are handling exception in SkRawCodec, which will trigger warning |
| 107 | # C4530. Add this flag as suggested by the compiler. |
| 108 | 'AdditionalOptions': ['/EHsc', ], |
| 109 | }, |
| 110 | }, |
yujieqin | 916de9f | 2016-01-25 08:26:16 -0800 | [diff] [blame] | 111 | 'include_dirs': [ |
| 112 | '../include/codec', |
| 113 | '../include/private', |
| 114 | '../src/codec', |
| 115 | '../src/core', |
| 116 | ], |
| 117 | 'sources': [ |
| 118 | '../src/codec/SkRawAdapterCodec.cpp', |
| 119 | '../src/codec/SkRawCodec.cpp', |
| 120 | ], |
| 121 | 'direct_dependent_settings': { |
| 122 | 'include_dirs': [ |
| 123 | '../include/codec', |
| 124 | ], |
yujieqin | 916de9f | 2016-01-25 08:26:16 -0800 | [diff] [blame] | 125 | }, |
yujieqin | 916de9f | 2016-01-25 08:26:16 -0800 | [diff] [blame] | 126 | 'conditions': [ |
| 127 | ['skia_arch_type == "x86" or skia_arch_type == "arm"', { |
| 128 | 'defines': [ |
| 129 | 'qDNGBigEndian=0', |
| 130 | ], |
| 131 | }], |
| 132 | ['skia_os == "ios" or skia_os == "mac"', { |
| 133 | 'xcode_settings': { |
| 134 | 'OTHER_CFLAGS': ['-fexceptions'], |
| 135 | 'OTHER_CPLUSPLUSFLAGS': ['-fexceptions'], |
| 136 | }, |
| 137 | }], |
yujieqin | ddb347b | 2016-02-25 05:42:30 -0800 | [diff] [blame] | 138 | ['skia_os == "chromeos"', { |
| 139 | 'link_settings': { |
| 140 | 'libraries': ['-lrt', ], |
| 141 | }, |
| 142 | }], |
yujieqin | 916de9f | 2016-01-25 08:26:16 -0800 | [diff] [blame] | 143 | ], |
scroggo | f24f224 | 2015-03-03 08:59:20 -0800 | [diff] [blame] | 144 | }, |
| 145 | ], |
| 146 | } |