blob: dedea5179bdd7c1ed51b79516d155e900ba76a18 [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 ],
robertphillips@google.com3a4553e2012-04-05 14:52:01 +000015 'export_dependent_settings': [
16 'libjpeg.gyp:*',
17 ],
epoger@google.comae85aea2011-05-31 13:50:51 +000018 'include_dirs': [
epoger@google.comae85aea2011-05-31 13:50:51 +000019 '../include/images',
halcanary@google.comad04eb42013-11-21 15:32:08 +000020 '../src/lazy',
scroggo@google.com39edf4c2013-04-25 17:33:51 +000021 # for access to SkErrorInternals.h
22 '../src/core/',
scroggo@google.comf8d7d272013-02-22 21:38:35 +000023 # for access to SkImagePriv.h
24 '../src/image/',
scroggo@google.com1a2e71d2013-08-28 19:13:13 +000025 # So src/ports/SkImageDecoder_CG can access SkStreamHelpers.h
26 '../src/images/',
epoger@google.comae85aea2011-05-31 13:50:51 +000027 ],
28 'sources': [
scroggo@google.com7def5e12013-05-31 14:00:10 +000029 '../include/images/SkForceLinking.h',
epoger@google.comae85aea2011-05-31 13:50:51 +000030 '../include/images/SkImageRef.h',
31 '../include/images/SkImageRef_GlobalPool.h',
robertphillips@google.comcb693192013-03-22 16:44:14 +000032 '../src/images/SkJpegUtility.h',
epoger@google.comae85aea2011-05-31 13:50:51 +000033 '../include/images/SkMovie.h',
34 '../include/images/SkPageFlipper.h',
35
36 '../src/images/bmpdecoderhelper.cpp',
37 '../src/images/bmpdecoderhelper.h',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000038
halcanary@google.comad04eb42013-11-21 15:32:08 +000039 '../src/images/SkDecodingImageGenerator.cpp',
halcanary@google.com2c7c7ee2013-12-05 18:31:42 +000040 '../src/images/SkDecodingImageGenerator.h',
scroggo@google.com7def5e12013-05-31 14:00:10 +000041 '../src/images/SkForceLinking.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000042 '../src/images/SkImageDecoder.cpp',
scroggo@google.com4c6adf92013-04-17 21:07:55 +000043 '../src/images/SkImageDecoder_FactoryDefault.cpp',
44 '../src/images/SkImageDecoder_FactoryRegistrar.cpp',
scroggo@google.comc4ebdb02013-05-01 21:17:27 +000045 # If decoders are added/removed to/from (all/individual)
scroggo@google.com7def5e12013-05-31 14:00:10 +000046 # platform(s), be sure to update SkForceLinking.cpp
scroggo@google.comc4ebdb02013-05-01 21:17:27 +000047 # so the right decoders will be forced to link.
epoger@google.comae85aea2011-05-31 13:50:51 +000048 '../src/images/SkImageDecoder_libbmp.cpp',
49 '../src/images/SkImageDecoder_libgif.cpp',
50 '../src/images/SkImageDecoder_libico.cpp',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000051 '../src/images/SkImageDecoder_libjpeg.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000052 '../src/images/SkImageDecoder_libpng.cpp',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000053 '../src/images/SkImageDecoder_libwebp.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000054 '../src/images/SkImageDecoder_wbmp.cpp',
55 '../src/images/SkImageEncoder.cpp',
56 '../src/images/SkImageEncoder_Factory.cpp',
bungeman@google.com8c6a4f22013-04-23 18:06:23 +000057 '../src/images/SkImageEncoder_argb.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000058 '../src/images/SkImageRef.cpp',
59 '../src/images/SkImageRefPool.cpp',
60 '../src/images/SkImageRefPool.h',
djsollen@google.com528a5562013-02-01 15:57:13 +000061 '../src/images/SkImageRef_ashmem.h',
62 '../src/images/SkImageRef_ashmem.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000063 '../src/images/SkImageRef_GlobalPool.cpp',
scroggo@google.com5a7c6be2012-10-04 21:46:08 +000064 '../src/images/SkImages.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000065 '../src/images/SkJpegUtility.cpp',
66 '../src/images/SkMovie.cpp',
67 '../src/images/SkMovie_gif.cpp',
68 '../src/images/SkPageFlipper.cpp',
69 '../src/images/SkScaledBitmapSampler.cpp',
70 '../src/images/SkScaledBitmapSampler.h',
scroggo@google.comdbf9f882013-08-21 15:01:48 +000071 '../src/images/SkStreamHelpers.cpp',
72 '../src/images/SkStreamHelpers.h',
bungeman@google.com242bb892011-06-22 20:42:34 +000073
74 '../src/ports/SkImageDecoder_CG.cpp',
75 '../src/ports/SkImageDecoder_WIC.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000076 ],
77 'conditions': [
epoger@google.com8846cb22011-07-01 20:20:07 +000078 [ 'skia_os == "win"', {
epoger@google.comae85aea2011-05-31 13:50:51 +000079 'sources!': [
scroggo@google.com4c6adf92013-04-17 21:07:55 +000080 '../src/images/SkImageDecoder_FactoryDefault.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000081 '../src/images/SkImageDecoder_libgif.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000082 '../src/images/SkImageDecoder_libpng.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000083 '../src/images/SkMovie_gif.cpp',
84 ],
bsalomon@google.com897e66c2011-11-21 21:04:06 +000085 'link_settings': {
86 'libraries': [
bungeman@google.com24339aa2013-12-02 19:54:33 +000087 '-lwindowscodecs.lib',
bsalomon@google.com897e66c2011-11-21 21:04:06 +000088 ],
89 },
epoger@google.com8846cb22011-07-01 20:20:07 +000090 },{ #else if skia_os != win
bungeman@google.com242bb892011-06-22 20:42:34 +000091 'sources!': [
92 '../src/ports/SkImageDecoder_WIC.cpp',
93 ],
epoger@google.comae85aea2011-05-31 13:50:51 +000094 }],
caryclark@google.com35f5ac92012-09-18 15:41:18 +000095 [ 'skia_os in ["mac", "ios"]', {
epoger@google.comae85aea2011-05-31 13:50:51 +000096 'sources!': [
scroggo@google.com4c6adf92013-04-17 21:07:55 +000097 '../src/images/SkImageDecoder_FactoryDefault.cpp',
reed@google.comaf9d9c22011-06-15 17:33:29 +000098 '../src/images/SkImageDecoder_libpng.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000099 '../src/images/SkImageDecoder_libgif.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000100 '../src/images/SkMovie_gif.cpp',
101 ],
epoger@google.com8846cb22011-07-01 20:20:07 +0000102 },{ #else if skia_os != mac
bungeman@google.com242bb892011-06-22 20:42:34 +0000103 'sources!': [
104 '../src/ports/SkImageDecoder_CG.cpp',
105 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000106 }],
scroggo@google.com3f1782802013-04-11 22:24:35 +0000107 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
scroggo@google.com9c5f9692013-04-11 18:32:01 +0000108 # Any targets that depend on this target should link in libpng, libgif, and
epoger@google.com38a91342011-06-15 13:45:10 +0000109 # our code that calls it.
110 # See http://code.google.com/p/gyp/wiki/InputFormatReference#Dependent_Settings
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000111 'link_settings': {
epoger@google.comb1b721a2011-06-16 12:27:14 +0000112 'libraries': [
scroggo@google.com9c5f9692013-04-11 18:32:01 +0000113 '-lgif',
epoger@google.comb1b721a2011-06-16 12:27:14 +0000114 '-lpng',
borenet@google.com327b9b22013-03-07 15:33:28 +0000115 '-lz',
epoger@google.comb1b721a2011-06-16 12:27:14 +0000116 ],
epoger@google.comccdbd2c2011-06-02 14:38:23 +0000117 },
scroggo@google.com9c5f9692013-04-11 18:32:01 +0000118 # end libpng/libgif stuff
epoger@google.comae85aea2011-05-31 13:50:51 +0000119 }],
scroggo@google.com3f1782802013-04-11 22:24:35 +0000120 # FIXME: NaCl should be just like linux, etc, above, but it currently is separated out
121 # to remove gif. Once gif is supported by naclports, this can be merged into the above
122 # condition.
123 [ 'skia_os == "nacl"', {
124 'sources!': [
125 '../src/images/SkImageDecoder_libgif.cpp',
126 '../src/images/SkMovie_gif.cpp',
127 ],
128 'link_settings': {
scroggo@google.com3f1782802013-04-11 22:24:35 +0000129 'libraries': [
130 '-lpng',
131 '-lz',
132 ],
133 },
134 }],
djsollen@google.com58629292011-11-03 13:08:29 +0000135 [ 'skia_os == "android"', {
djsollen@google.com528a5562013-02-01 15:57:13 +0000136 'include_dirs': [
137 '../src/utils',
djsollen@google.com58629292011-11-03 13:08:29 +0000138 ],
139 'dependencies': [
borenet@google.comaf730912012-08-09 15:54:28 +0000140 'android_deps.gyp:gif',
141 'android_deps.gyp:png',
djsollen@google.com58629292011-11-03 13:08:29 +0000142 ],
djsollen@google.combcc6d7d2013-07-23 15:51:12 +0000143 'export_dependent_settings': [
144 'android_deps.gyp:png'
145 ],
djsollen@google.com528a5562013-02-01 15:57:13 +0000146 },{ #else if skia_os != android
147 'sources!': [
148 '../src/images/SkImageRef_ashmem.h',
149 '../src/images/SkImageRef_ashmem.cpp',
150 ],
djsollen@google.com58629292011-11-03 13:08:29 +0000151 }],
borenet@google.com05d550e2013-06-11 15:52:19 +0000152 [ 'skia_os == "chromeos"', {
153 'dependencies': [
154 'chromeos_deps.gyp:gif',
155 ],
156 'link_settings': {
157 'libraries': [
158 '-lpng',
159 ],
160 },
161 }],
caryclark@google.com35f5ac92012-09-18 15:41:18 +0000162 [ 'skia_os == "ios"', {
163 'include_dirs': [
164 '../include/utils/mac',
165 ],
166 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000167 ],
168 'direct_dependent_settings': {
169 'include_dirs': [
170 '../include/images',
epoger@google.comae85aea2011-05-31 13:50:51 +0000171 ],
172 },
173 },
174 ],
175}