scroggo | 3e56227 | 2015-03-25 10:22:41 -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. |
msarett | 6d0e7b2 | 2015-03-30 07:52:52 -0700 | [diff] [blame] | 5 | |
scroggo@google.com | 73e4d57 | 2013-05-20 22:15:32 +0000 | [diff] [blame] | 6 | # GYP file for images project. |
scroggo@google.com | 4c6adf9 | 2013-04-17 21:07:55 +0000 | [diff] [blame] | 7 | { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 8 | 'targets': [ |
| 9 | { |
| 10 | 'target_name': 'images', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 11 | 'product_name': 'skia_images', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 12 | 'type': 'static_library', |
borenet@google.com | efb1d77 | 2012-10-10 19:45:51 +0000 | [diff] [blame] | 13 | 'standalone_static_library': 1, |
bungeman@google.com | 9df621d | 2011-06-23 21:43:52 +0000 | [diff] [blame] | 14 | 'dependencies': [ |
bungeman@google.com | b8f3655 | 2013-07-22 14:39:45 +0000 | [diff] [blame] | 15 | 'core.gyp:*', |
msarett | 6d0e7b2 | 2015-03-30 07:52:52 -0700 | [diff] [blame] | 16 | 'giflib.gyp:giflib', |
msarett | b747b90 | 2015-11-06 11:15:49 -0800 | [diff] [blame] | 17 | 'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector', |
robertphillips@google.com | 8cf81e0 | 2014-05-22 18:40:29 +0000 | [diff] [blame] | 18 | 'etc1.gyp:libetc1', |
krajcevski | 99ffe24 | 2014-06-03 13:04:35 -0700 | [diff] [blame] | 19 | 'ktx.gyp:libSkKTX', |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 20 | 'libwebp.gyp:libwebp', |
bungeman@google.com | 9df621d | 2011-06-23 21:43:52 +0000 | [diff] [blame] | 21 | 'utils.gyp:utils', |
| 22 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 23 | 'include_dirs': [ |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 24 | '../include/images', |
mtklein | cd1f2da | 2015-07-28 08:55:14 -0700 | [diff] [blame] | 25 | '../include/private', |
halcanary@google.com | ad04eb4 | 2013-11-21 15:32:08 +0000 | [diff] [blame] | 26 | '../src/lazy', |
scroggo@google.com | 39edf4c | 2013-04-25 17:33:51 +0000 | [diff] [blame] | 27 | # for access to SkErrorInternals.h |
| 28 | '../src/core/', |
scroggo@google.com | f8d7d27 | 2013-02-22 21:38:35 +0000 | [diff] [blame] | 29 | # for access to SkImagePriv.h |
| 30 | '../src/image/', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 31 | ], |
| 32 | 'sources': [ |
commit-bot@chromium.org | 29239a0 | 2014-05-27 14:59:47 +0000 | [diff] [blame] | 33 | '../include/images/SkDecodingImageGenerator.h', |
scroggo@google.com | 7def5e1 | 2013-05-31 14:00:10 +0000 | [diff] [blame] | 34 | '../include/images/SkForceLinking.h', |
scroggo | 27631bd | 2015-06-15 09:10:03 -0700 | [diff] [blame] | 35 | '../src/images/SkJpegUtility.h', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 36 | '../include/images/SkMovie.h', |
| 37 | '../include/images/SkPageFlipper.h', |
| 38 | |
| 39 | '../src/images/bmpdecoderhelper.cpp', |
| 40 | '../src/images/bmpdecoderhelper.h', |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 41 | |
halcanary@google.com | ad04eb4 | 2013-11-21 15:32:08 +0000 | [diff] [blame] | 42 | '../src/images/SkDecodingImageGenerator.cpp', |
scroggo@google.com | 7def5e1 | 2013-05-31 14:00:10 +0000 | [diff] [blame] | 43 | '../src/images/SkForceLinking.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 44 | '../src/images/SkImageDecoder.cpp', |
scroggo@google.com | 4c6adf9 | 2013-04-17 21:07:55 +0000 | [diff] [blame] | 45 | '../src/images/SkImageDecoder_FactoryDefault.cpp', |
| 46 | '../src/images/SkImageDecoder_FactoryRegistrar.cpp', |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 47 | |
scroggo@google.com | c4ebdb0 | 2013-05-01 21:17:27 +0000 | [diff] [blame] | 48 | # If decoders are added/removed to/from (all/individual) |
scroggo@google.com | 7def5e1 | 2013-05-31 14:00:10 +0000 | [diff] [blame] | 49 | # platform(s), be sure to update SkForceLinking.cpp |
scroggo@google.com | c4ebdb0 | 2013-05-01 21:17:27 +0000 | [diff] [blame] | 50 | # so the right decoders will be forced to link. |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 51 | |
| 52 | # IMPORTANT: The build order of the SkImageDecoder_*.cpp files |
| 53 | # defines the order image decoders are tested when decoding a |
| 54 | # stream. The last decoder is the first one tested, so the .cpp |
| 55 | # files should be in listed in order from the least likely to be |
| 56 | # used, to the most likely (jpeg and png should be the last two |
| 57 | # for instance.) As a result, they are deliberately not in |
| 58 | # alphabetical order. |
| 59 | '../src/images/SkImageDecoder_wbmp.cpp', |
robertphillips@google.com | 8cf81e0 | 2014-05-22 18:40:29 +0000 | [diff] [blame] | 60 | '../src/images/SkImageDecoder_pkm.cpp', |
krajcevski | 99ffe24 | 2014-06-03 13:04:35 -0700 | [diff] [blame] | 61 | '../src/images/SkImageDecoder_ktx.cpp', |
krajcevski | 95b1b3d | 2014-08-07 12:58:38 -0700 | [diff] [blame] | 62 | '../src/images/SkImageDecoder_astc.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 63 | '../src/images/SkImageDecoder_libbmp.cpp', |
| 64 | '../src/images/SkImageDecoder_libgif.cpp', |
| 65 | '../src/images/SkImageDecoder_libico.cpp', |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 66 | '../src/images/SkImageDecoder_libwebp.cpp', |
commit-bot@chromium.org | a936e37 | 2013-03-14 14:42:18 +0000 | [diff] [blame] | 67 | '../src/images/SkImageDecoder_libjpeg.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 68 | '../src/images/SkImageDecoder_libpng.cpp', |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 69 | |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 70 | '../src/images/SkImageEncoder.cpp', |
| 71 | '../src/images/SkImageEncoder_Factory.cpp', |
bungeman@google.com | 8c6a4f2 | 2013-04-23 18:06:23 +0000 | [diff] [blame] | 72 | '../src/images/SkImageEncoder_argb.cpp', |
scroggo | 27631bd | 2015-06-15 09:10:03 -0700 | [diff] [blame] | 73 | '../src/images/SkJpegUtility.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 74 | '../src/images/SkMovie.cpp', |
| 75 | '../src/images/SkMovie_gif.cpp', |
| 76 | '../src/images/SkPageFlipper.cpp', |
| 77 | '../src/images/SkScaledBitmapSampler.cpp', |
| 78 | '../src/images/SkScaledBitmapSampler.h', |
bungeman@google.com | 242bb89 | 2011-06-22 20:42:34 +0000 | [diff] [blame] | 79 | |
reed | 5965c8a | 2015-01-07 18:04:45 -0800 | [diff] [blame] | 80 | '../src/ports/SkImageGenerator_skia.cpp', |
| 81 | |
bungeman@google.com | 242bb89 | 2011-06-22 20:42:34 +0000 | [diff] [blame] | 82 | '../src/ports/SkImageDecoder_CG.cpp', |
| 83 | '../src/ports/SkImageDecoder_WIC.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 84 | ], |
| 85 | 'conditions': [ |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 86 | [ 'skia_os == "win"', { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 87 | 'sources!': [ |
scroggo@google.com | 4c6adf9 | 2013-04-17 21:07:55 +0000 | [diff] [blame] | 88 | '../src/images/SkImageDecoder_FactoryDefault.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 89 | '../src/images/SkImageDecoder_libgif.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 90 | '../src/images/SkImageDecoder_libpng.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 91 | '../src/images/SkMovie_gif.cpp', |
| 92 | ], |
msarett | 6d0e7b2 | 2015-03-30 07:52:52 -0700 | [diff] [blame] | 93 | 'dependencies!': [ |
| 94 | 'giflib.gyp:giflib' |
| 95 | ], |
bsalomon@google.com | 897e66c | 2011-11-21 21:04:06 +0000 | [diff] [blame] | 96 | 'link_settings': { |
| 97 | 'libraries': [ |
bungeman@google.com | 24339aa | 2013-12-02 19:54:33 +0000 | [diff] [blame] | 98 | '-lwindowscodecs.lib', |
bsalomon@google.com | 897e66c | 2011-11-21 21:04:06 +0000 | [diff] [blame] | 99 | ], |
| 100 | }, |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 101 | },{ #else if skia_os != win |
bungeman@google.com | 242bb89 | 2011-06-22 20:42:34 +0000 | [diff] [blame] | 102 | 'sources!': [ |
| 103 | '../src/ports/SkImageDecoder_WIC.cpp', |
| 104 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 105 | }], |
caryclark@google.com | 35f5ac9 | 2012-09-18 15:41:18 +0000 | [diff] [blame] | 106 | [ 'skia_os in ["mac", "ios"]', { |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 107 | 'sources!': [ |
scroggo@google.com | 4c6adf9 | 2013-04-17 21:07:55 +0000 | [diff] [blame] | 108 | '../src/images/SkImageDecoder_FactoryDefault.cpp', |
reed@google.com | af9d9c2 | 2011-06-15 17:33:29 +0000 | [diff] [blame] | 109 | '../src/images/SkImageDecoder_libpng.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 110 | '../src/images/SkImageDecoder_libgif.cpp', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 111 | '../src/images/SkMovie_gif.cpp', |
| 112 | ], |
epoger@google.com | 8846cb2 | 2011-07-01 20:20:07 +0000 | [diff] [blame] | 113 | },{ #else if skia_os != mac |
bungeman@google.com | 242bb89 | 2011-06-22 20:42:34 +0000 | [diff] [blame] | 114 | 'sources!': [ |
| 115 | '../src/ports/SkImageDecoder_CG.cpp', |
| 116 | ], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 117 | }], |
scroggo@google.com | 3f17828 | 2013-04-11 22:24:35 +0000 | [diff] [blame] | 118 | [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', { |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 119 | 'dependencies': [ |
| 120 | 'libpng.gyp:libpng', |
commit-bot@chromium.org | f84722e | 2014-02-24 20:22:34 +0000 | [diff] [blame] | 121 | ], |
msarett | 6d0e7b2 | 2015-03-30 07:52:52 -0700 | [diff] [blame] | 122 | # end libpng stuff |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 123 | }], |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 124 | [ 'skia_os == "android"', { |
djsollen@google.com | 528a556 | 2013-02-01 15:57:13 +0000 | [diff] [blame] | 125 | 'include_dirs': [ |
| 126 | '../src/utils', |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 127 | ], |
msarett | f724b99 | 2015-10-15 06:41:06 -0700 | [diff] [blame] | 128 | 'cflags' : [ |
| 129 | # SkImageDecoder_libpng includes png.h. |
| 130 | # In the version of libpng that we use on Android (1.2.46), |
| 131 | # there is a missing space between a literal and an identifier |
| 132 | # in png.h, triggering a warning in C++11. |
| 133 | '-Wno-literal-suffix', |
| 134 | ], |
msarett | b747b90 | 2015-11-06 11:15:49 -0800 | [diff] [blame] | 135 | 'dependencies': [ |
| 136 | 'libpng.gyp:libpng', |
| 137 | ], |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 138 | 'conditions': [ |
msarett | b747b90 | 2015-11-06 11:15:49 -0800 | [diff] [blame] | 139 | [ 'skia_android_framework == 1', { |
djsollen | 38e44b0 | 2014-08-28 05:41:21 -0700 | [diff] [blame] | 140 | # The android framework disables these decoders as they are of little use to |
| 141 | # Java applications that can't take advantage of the compressed formats. |
| 142 | 'sources!': [ |
| 143 | '../src/images/SkImageDecoder_pkm.cpp', |
| 144 | '../src/images/SkImageDecoder_ktx.cpp', |
| 145 | '../src/images/SkImageDecoder_astc.cpp', |
scroggo@google.com | d4adfa3 | 2014-02-05 16:35:12 +0000 | [diff] [blame] | 146 | ], |
| 147 | }], |
djsollen@google.com | bcc6d7d | 2013-07-23 15:51:12 +0000 | [diff] [blame] | 148 | ], |
djsollen@google.com | 5862929 | 2011-11-03 13:08:29 +0000 | [diff] [blame] | 149 | }], |
borenet@google.com | 05d550e | 2013-06-11 15:52:19 +0000 | [diff] [blame] | 150 | [ 'skia_os == "chromeos"', { |
| 151 | 'dependencies': [ |
msarett | 6d0e7b2 | 2015-03-30 07:52:52 -0700 | [diff] [blame] | 152 | 'libpng.gyp:libpng', |
borenet@google.com | 05d550e | 2013-06-11 15:52:19 +0000 | [diff] [blame] | 153 | ], |
borenet@google.com | 05d550e | 2013-06-11 15:52:19 +0000 | [diff] [blame] | 154 | }], |
caryclark@google.com | 35f5ac9 | 2012-09-18 15:41:18 +0000 | [diff] [blame] | 155 | [ 'skia_os == "ios"', { |
| 156 | 'include_dirs': [ |
| 157 | '../include/utils/mac', |
| 158 | ], |
| 159 | }], |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 160 | ], |
| 161 | 'direct_dependent_settings': { |
| 162 | 'include_dirs': [ |
| 163 | '../include/images', |
epoger@google.com | ae85aea | 2011-05-31 13:50:51 +0000 | [diff] [blame] | 164 | ], |
| 165 | }, |
| 166 | }, |
| 167 | ], |
| 168 | } |