blob: 13cf3bbf9a8c1aff95940c72d98d34558b32fc40 [file] [log] [blame]
scroggo@google.com73e4d572013-05-20 22:15:32 +00001# GYP file for images project.
scroggo@google.com4c6adf92013-04-17 21:07:55 +00002{
epoger@google.comae85aea2011-05-31 13:50:51 +00003 'targets': [
4 {
5 'target_name': 'images',
borenet@google.comefb1d772012-10-10 19:45:51 +00006 'product_name': 'skia_images',
epoger@google.comae85aea2011-05-31 13:50:51 +00007 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +00008 'standalone_static_library': 1,
bungeman@google.com9df621d2011-06-23 21:43:52 +00009 'dependencies': [
bungeman@google.comb8f36552013-07-22 14:39:45 +000010 'core.gyp:*',
robertphillips@google.com3a4553e2012-04-05 14:52:01 +000011 'libjpeg.gyp:*',
robertphillips@google.com8cf81e02014-05-22 18:40:29 +000012 'etc1.gyp:libetc1',
krajcevski99ffe242014-06-03 13:04:35 -070013 'ktx.gyp:libSkKTX',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000014 'libwebp.gyp:libwebp',
bungeman@google.com9df621d2011-06-23 21:43:52 +000015 'utils.gyp:utils',
16 ],
epoger@google.comae85aea2011-05-31 13:50:51 +000017 'include_dirs': [
epoger@google.comae85aea2011-05-31 13:50:51 +000018 '../include/images',
halcanary@google.comad04eb42013-11-21 15:32:08 +000019 '../src/lazy',
scroggo@google.com39edf4c2013-04-25 17:33:51 +000020 # for access to SkErrorInternals.h
21 '../src/core/',
scroggo@google.comf8d7d272013-02-22 21:38:35 +000022 # for access to SkImagePriv.h
23 '../src/image/',
epoger@google.comae85aea2011-05-31 13:50:51 +000024 ],
25 'sources': [
commit-bot@chromium.org29239a02014-05-27 14:59:47 +000026 '../include/images/SkDecodingImageGenerator.h',
scroggo@google.com7def5e12013-05-31 14:00:10 +000027 '../include/images/SkForceLinking.h',
robertphillips@google.comcb693192013-03-22 16:44:14 +000028 '../src/images/SkJpegUtility.h',
epoger@google.comae85aea2011-05-31 13:50:51 +000029 '../include/images/SkMovie.h',
30 '../include/images/SkPageFlipper.h',
31
32 '../src/images/bmpdecoderhelper.cpp',
33 '../src/images/bmpdecoderhelper.h',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000034
halcanary@google.comad04eb42013-11-21 15:32:08 +000035 '../src/images/SkDecodingImageGenerator.cpp',
scroggo@google.com7def5e12013-05-31 14:00:10 +000036 '../src/images/SkForceLinking.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000037 '../src/images/SkImageDecoder.cpp',
scroggo@google.com4c6adf92013-04-17 21:07:55 +000038 '../src/images/SkImageDecoder_FactoryDefault.cpp',
39 '../src/images/SkImageDecoder_FactoryRegistrar.cpp',
scroggo@google.comd4adfa32014-02-05 16:35:12 +000040
scroggo@google.comc4ebdb02013-05-01 21:17:27 +000041 # If decoders are added/removed to/from (all/individual)
scroggo@google.com7def5e12013-05-31 14:00:10 +000042 # platform(s), be sure to update SkForceLinking.cpp
scroggo@google.comc4ebdb02013-05-01 21:17:27 +000043 # so the right decoders will be forced to link.
scroggo@google.comd4adfa32014-02-05 16:35:12 +000044
45 # IMPORTANT: The build order of the SkImageDecoder_*.cpp files
46 # defines the order image decoders are tested when decoding a
47 # stream. The last decoder is the first one tested, so the .cpp
48 # files should be in listed in order from the least likely to be
49 # used, to the most likely (jpeg and png should be the last two
50 # for instance.) As a result, they are deliberately not in
51 # alphabetical order.
52 '../src/images/SkImageDecoder_wbmp.cpp',
robertphillips@google.com8cf81e02014-05-22 18:40:29 +000053 '../src/images/SkImageDecoder_pkm.cpp',
krajcevski99ffe242014-06-03 13:04:35 -070054 '../src/images/SkImageDecoder_ktx.cpp',
krajcevski95b1b3d2014-08-07 12:58:38 -070055 '../src/images/SkImageDecoder_astc.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000056 '../src/images/SkImageDecoder_libbmp.cpp',
57 '../src/images/SkImageDecoder_libgif.cpp',
58 '../src/images/SkImageDecoder_libico.cpp',
scroggo@google.comd4adfa32014-02-05 16:35:12 +000059 '../src/images/SkImageDecoder_libwebp.cpp',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000060 '../src/images/SkImageDecoder_libjpeg.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000061 '../src/images/SkImageDecoder_libpng.cpp',
scroggo@google.comd4adfa32014-02-05 16:35:12 +000062
epoger@google.comae85aea2011-05-31 13:50:51 +000063 '../src/images/SkImageEncoder.cpp',
64 '../src/images/SkImageEncoder_Factory.cpp',
bungeman@google.com8c6a4f22013-04-23 18:06:23 +000065 '../src/images/SkImageEncoder_argb.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000066 '../src/images/SkJpegUtility.cpp',
67 '../src/images/SkMovie.cpp',
68 '../src/images/SkMovie_gif.cpp',
69 '../src/images/SkPageFlipper.cpp',
70 '../src/images/SkScaledBitmapSampler.cpp',
71 '../src/images/SkScaledBitmapSampler.h',
bungeman@google.com242bb892011-06-22 20:42:34 +000072
73 '../src/ports/SkImageDecoder_CG.cpp',
74 '../src/ports/SkImageDecoder_WIC.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000075 ],
76 'conditions': [
epoger@google.com8846cb22011-07-01 20:20:07 +000077 [ 'skia_os == "win"', {
epoger@google.comae85aea2011-05-31 13:50:51 +000078 'sources!': [
scroggo@google.com4c6adf92013-04-17 21:07:55 +000079 '../src/images/SkImageDecoder_FactoryDefault.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000080 '../src/images/SkImageDecoder_libgif.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000081 '../src/images/SkImageDecoder_libpng.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000082 '../src/images/SkMovie_gif.cpp',
83 ],
bsalomon@google.com897e66c2011-11-21 21:04:06 +000084 'link_settings': {
85 'libraries': [
bungeman@google.com24339aa2013-12-02 19:54:33 +000086 '-lwindowscodecs.lib',
bsalomon@google.com897e66c2011-11-21 21:04:06 +000087 ],
88 },
epoger@google.com8846cb22011-07-01 20:20:07 +000089 },{ #else if skia_os != win
bungeman@google.com242bb892011-06-22 20:42:34 +000090 'sources!': [
91 '../src/ports/SkImageDecoder_WIC.cpp',
92 ],
epoger@google.comae85aea2011-05-31 13:50:51 +000093 }],
caryclark@google.com35f5ac92012-09-18 15:41:18 +000094 [ 'skia_os in ["mac", "ios"]', {
epoger@google.comae85aea2011-05-31 13:50:51 +000095 'sources!': [
scroggo@google.com4c6adf92013-04-17 21:07:55 +000096 '../src/images/SkImageDecoder_FactoryDefault.cpp',
reed@google.comaf9d9c22011-06-15 17:33:29 +000097 '../src/images/SkImageDecoder_libpng.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000098 '../src/images/SkImageDecoder_libgif.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000099 '../src/images/SkMovie_gif.cpp',
100 ],
epoger@google.com8846cb22011-07-01 20:20:07 +0000101 },{ #else if skia_os != mac
bungeman@google.com242bb892011-06-22 20:42:34 +0000102 'sources!': [
103 '../src/ports/SkImageDecoder_CG.cpp',
104 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000105 }],
scroggo@google.com3f178282013-04-11 22:24:35 +0000106 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +0000107 'export_dependent_settings': [
108 'libpng.gyp:libpng',
109 'giflib.gyp:giflib'
110 ],
111 'dependencies': [
112 'libpng.gyp:libpng',
113 'giflib.gyp:giflib'
114 ],
scroggo@google.com9c5f9692013-04-11 18:32:01 +0000115 # end libpng/libgif stuff
epoger@google.comae85aea2011-05-31 13:50:51 +0000116 }],
scroggo@google.com3f178282013-04-11 22:24:35 +0000117 # FIXME: NaCl should be just like linux, etc, above, but it currently is separated out
118 # to remove gif. Once gif is supported by naclports, this can be merged into the above
119 # condition.
120 [ 'skia_os == "nacl"', {
121 'sources!': [
122 '../src/images/SkImageDecoder_libgif.cpp',
123 '../src/images/SkMovie_gif.cpp',
124 ],
scroggo@google.com3f178282013-04-11 22:24:35 +0000125 }],
djsollen@google.com58629292011-11-03 13:08:29 +0000126 [ 'skia_os == "android"', {
djsollen@google.com528a5562013-02-01 15:57:13 +0000127 'include_dirs': [
128 '../src/utils',
djsollen@google.com58629292011-11-03 13:08:29 +0000129 ],
130 'dependencies': [
borenet@google.comaf730912012-08-09 15:54:28 +0000131 'android_deps.gyp:gif',
132 'android_deps.gyp:png',
djsollen@google.com58629292011-11-03 13:08:29 +0000133 ],
scroggo@google.comd4adfa32014-02-05 16:35:12 +0000134 'conditions': [
135 [ 'skia_android_framework == 0', {
136 'export_dependent_settings': [
djsollen38e44b02014-08-28 05:41:21 -0700137 'android_deps.gyp:png',
138 'libjpeg.gyp:*'
139 ],
140 }, {
141 # The android framework disables these decoders as they are of little use to
142 # Java applications that can't take advantage of the compressed formats.
143 'sources!': [
144 '../src/images/SkImageDecoder_pkm.cpp',
145 '../src/images/SkImageDecoder_ktx.cpp',
146 '../src/images/SkImageDecoder_astc.cpp',
scroggo@google.comd4adfa32014-02-05 16:35:12 +0000147 ],
148 }],
djsollen@google.combcc6d7d2013-07-23 15:51:12 +0000149 ],
djsollen@google.com58629292011-11-03 13:08:29 +0000150 }],
borenet@google.com05d550e2013-06-11 15:52:19 +0000151 [ 'skia_os == "chromeos"', {
152 'dependencies': [
153 'chromeos_deps.gyp:gif',
commit-bot@chromium.org2ea14c62014-02-24 21:39:01 +0000154 'libpng.gyp:libpng',
borenet@google.com05d550e2013-06-11 15:52:19 +0000155 ],
borenet@google.com05d550e2013-06-11 15:52:19 +0000156 }],
caryclark@google.com35f5ac92012-09-18 15:41:18 +0000157 [ 'skia_os == "ios"', {
158 'include_dirs': [
159 '../include/utils/mac',
160 ],
161 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000162 ],
163 'direct_dependent_settings': {
164 'include_dirs': [
165 '../include/images',
epoger@google.comae85aea2011-05-31 13:50:51 +0000166 ],
167 },
168 },
169 ],
170}