blob: 0fb74e6bbc55789900914cb4068e31115d210e5d [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:*',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000012 'libwebp.gyp:libwebp',
bungeman@google.com9df621d2011-06-23 21:43:52 +000013 'utils.gyp:utils',
14 ],
scroggo@google.comd4adfa32014-02-05 16:35:12 +000015 'conditions': [
16 [ 'skia_android_framework == 0', {
17 'export_dependent_settings': [
18 'libjpeg.gyp:*',
19 ],
20 }],
robertphillips@google.com3a4553e2012-04-05 14:52:01 +000021 ],
epoger@google.comae85aea2011-05-31 13:50:51 +000022 'include_dirs': [
epoger@google.comae85aea2011-05-31 13:50:51 +000023 '../include/images',
halcanary@google.comad04eb42013-11-21 15:32:08 +000024 '../src/lazy',
scroggo@google.com39edf4c2013-04-25 17:33:51 +000025 # for access to SkErrorInternals.h
26 '../src/core/',
scroggo@google.comf8d7d272013-02-22 21:38:35 +000027 # for access to SkImagePriv.h
28 '../src/image/',
scroggo@google.com1a2e71d2013-08-28 19:13:13 +000029 # So src/ports/SkImageDecoder_CG can access SkStreamHelpers.h
30 '../src/images/',
epoger@google.comae85aea2011-05-31 13:50:51 +000031 ],
32 'sources': [
scroggo@google.com7def5e12013-05-31 14:00:10 +000033 '../include/images/SkForceLinking.h',
epoger@google.comae85aea2011-05-31 13:50:51 +000034 '../include/images/SkImageRef.h',
35 '../include/images/SkImageRef_GlobalPool.h',
robertphillips@google.comcb693192013-03-22 16:44:14 +000036 '../src/images/SkJpegUtility.h',
epoger@google.comae85aea2011-05-31 13:50:51 +000037 '../include/images/SkMovie.h',
38 '../include/images/SkPageFlipper.h',
39
40 '../src/images/bmpdecoderhelper.cpp',
41 '../src/images/bmpdecoderhelper.h',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000042
halcanary@google.comad04eb42013-11-21 15:32:08 +000043 '../src/images/SkDecodingImageGenerator.cpp',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +000044 '../src/images/SkDecodingImageGenerator.h',
scroggo@google.com7def5e12013-05-31 14:00:10 +000045 '../src/images/SkForceLinking.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000046 '../src/images/SkImageDecoder.cpp',
scroggo@google.com4c6adf92013-04-17 21:07:55 +000047 '../src/images/SkImageDecoder_FactoryDefault.cpp',
48 '../src/images/SkImageDecoder_FactoryRegistrar.cpp',
scroggo@google.comd4adfa32014-02-05 16:35:12 +000049
scroggo@google.comc4ebdb02013-05-01 21:17:27 +000050 # If decoders are added/removed to/from (all/individual)
scroggo@google.com7def5e12013-05-31 14:00:10 +000051 # platform(s), be sure to update SkForceLinking.cpp
scroggo@google.comc4ebdb02013-05-01 21:17:27 +000052 # so the right decoders will be forced to link.
scroggo@google.comd4adfa32014-02-05 16:35:12 +000053
54 # IMPORTANT: The build order of the SkImageDecoder_*.cpp files
55 # defines the order image decoders are tested when decoding a
56 # stream. The last decoder is the first one tested, so the .cpp
57 # files should be in listed in order from the least likely to be
58 # used, to the most likely (jpeg and png should be the last two
59 # for instance.) As a result, they are deliberately not in
60 # alphabetical order.
61 '../src/images/SkImageDecoder_wbmp.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000062 '../src/images/SkImageDecoder_libbmp.cpp',
63 '../src/images/SkImageDecoder_libgif.cpp',
64 '../src/images/SkImageDecoder_libico.cpp',
scroggo@google.comd4adfa32014-02-05 16:35:12 +000065 '../src/images/SkImageDecoder_libwebp.cpp',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000066 '../src/images/SkImageDecoder_libjpeg.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000067 '../src/images/SkImageDecoder_libpng.cpp',
scroggo@google.comd4adfa32014-02-05 16:35:12 +000068
epoger@google.comae85aea2011-05-31 13:50:51 +000069 '../src/images/SkImageEncoder.cpp',
70 '../src/images/SkImageEncoder_Factory.cpp',
bungeman@google.com8c6a4f22013-04-23 18:06:23 +000071 '../src/images/SkImageEncoder_argb.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000072 '../src/images/SkImageRef.cpp',
73 '../src/images/SkImageRefPool.cpp',
74 '../src/images/SkImageRefPool.h',
djsollen@google.com528a5562013-02-01 15:57:13 +000075 '../src/images/SkImageRef_ashmem.h',
76 '../src/images/SkImageRef_ashmem.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000077 '../src/images/SkImageRef_GlobalPool.cpp',
scroggo@google.com5a7c6be2012-10-04 21:46:08 +000078 '../src/images/SkImages.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000079 '../src/images/SkJpegUtility.cpp',
80 '../src/images/SkMovie.cpp',
81 '../src/images/SkMovie_gif.cpp',
82 '../src/images/SkPageFlipper.cpp',
83 '../src/images/SkScaledBitmapSampler.cpp',
84 '../src/images/SkScaledBitmapSampler.h',
scroggo@google.comdbf9f882013-08-21 15:01:48 +000085 '../src/images/SkStreamHelpers.cpp',
86 '../src/images/SkStreamHelpers.h',
bungeman@google.com242bb892011-06-22 20:42:34 +000087
88 '../src/ports/SkImageDecoder_CG.cpp',
89 '../src/ports/SkImageDecoder_WIC.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000090 ],
91 'conditions': [
epoger@google.com8846cb22011-07-01 20:20:07 +000092 [ 'skia_os == "win"', {
epoger@google.comae85aea2011-05-31 13:50:51 +000093 'sources!': [
scroggo@google.com4c6adf92013-04-17 21:07:55 +000094 '../src/images/SkImageDecoder_FactoryDefault.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000095 '../src/images/SkImageDecoder_libgif.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000096 '../src/images/SkImageDecoder_libpng.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000097 '../src/images/SkMovie_gif.cpp',
98 ],
bsalomon@google.com897e66c2011-11-21 21:04:06 +000099 'link_settings': {
100 'libraries': [
bungeman@google.com24339aa2013-12-02 19:54:33 +0000101 '-lwindowscodecs.lib',
bsalomon@google.com897e66c2011-11-21 21:04:06 +0000102 ],
103 },
epoger@google.com8846cb22011-07-01 20:20:07 +0000104 },{ #else if skia_os != win
bungeman@google.com242bb892011-06-22 20:42:34 +0000105 'sources!': [
106 '../src/ports/SkImageDecoder_WIC.cpp',
107 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000108 }],
caryclark@google.com35f5ac92012-09-18 15:41:18 +0000109 [ 'skia_os in ["mac", "ios"]', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000110 'sources!': [
scroggo@google.com4c6adf92013-04-17 21:07:55 +0000111 '../src/images/SkImageDecoder_FactoryDefault.cpp',
reed@google.comaf9d9c22011-06-15 17:33:29 +0000112 '../src/images/SkImageDecoder_libpng.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000113 '../src/images/SkImageDecoder_libgif.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000114 '../src/images/SkMovie_gif.cpp',
115 ],
epoger@google.com8846cb22011-07-01 20:20:07 +0000116 },{ #else if skia_os != mac
bungeman@google.com242bb892011-06-22 20:42:34 +0000117 'sources!': [
118 '../src/ports/SkImageDecoder_CG.cpp',
119 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000120 }],
scroggo@google.com3f1782802013-04-11 22:24:35 +0000121 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +0000122 'export_dependent_settings': [
123 'libpng.gyp:libpng',
124 'giflib.gyp:giflib'
125 ],
126 'dependencies': [
127 'libpng.gyp:libpng',
128 'giflib.gyp:giflib'
129 ],
scroggo@google.com9c5f9692013-04-11 18:32:01 +0000130 # end libpng/libgif stuff
epoger@google.comae85aea2011-05-31 13:50:51 +0000131 }],
scroggo@google.com3f1782802013-04-11 22:24:35 +0000132 # FIXME: NaCl should be just like linux, etc, above, but it currently is separated out
133 # to remove gif. Once gif is supported by naclports, this can be merged into the above
134 # condition.
135 [ 'skia_os == "nacl"', {
136 'sources!': [
137 '../src/images/SkImageDecoder_libgif.cpp',
138 '../src/images/SkMovie_gif.cpp',
139 ],
scroggo@google.com3f1782802013-04-11 22:24:35 +0000140 }],
djsollen@google.com58629292011-11-03 13:08:29 +0000141 [ 'skia_os == "android"', {
djsollen@google.com528a5562013-02-01 15:57:13 +0000142 'include_dirs': [
143 '../src/utils',
djsollen@google.com58629292011-11-03 13:08:29 +0000144 ],
145 'dependencies': [
borenet@google.comaf730912012-08-09 15:54:28 +0000146 'android_deps.gyp:gif',
147 'android_deps.gyp:png',
djsollen@google.com58629292011-11-03 13:08:29 +0000148 ],
scroggo@google.comd4adfa32014-02-05 16:35:12 +0000149 'conditions': [
150 [ 'skia_android_framework == 0', {
151 'export_dependent_settings': [
152 'android_deps.gyp:png'
153 ],
154 }],
djsollen@google.combcc6d7d2013-07-23 15:51:12 +0000155 ],
djsollen@google.com528a5562013-02-01 15:57:13 +0000156 },{ #else if skia_os != android
157 'sources!': [
158 '../src/images/SkImageRef_ashmem.h',
159 '../src/images/SkImageRef_ashmem.cpp',
160 ],
djsollen@google.com58629292011-11-03 13:08:29 +0000161 }],
borenet@google.com05d550e2013-06-11 15:52:19 +0000162 [ 'skia_os == "chromeos"', {
163 'dependencies': [
164 'chromeos_deps.gyp:gif',
commit-bot@chromium.org2ea14c62014-02-24 21:39:01 +0000165 'libpng.gyp:libpng',
borenet@google.com05d550e2013-06-11 15:52:19 +0000166 ],
borenet@google.com05d550e2013-06-11 15:52:19 +0000167 }],
caryclark@google.com35f5ac92012-09-18 15:41:18 +0000168 [ 'skia_os == "ios"', {
169 'include_dirs': [
170 '../include/utils/mac',
171 ],
172 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000173 ],
174 'direct_dependent_settings': {
175 'include_dirs': [
176 '../include/images',
epoger@google.comae85aea2011-05-31 13:50:51 +0000177 ],
178 },
179 },
180 ],
181}