blob: 1c434ae9bf00b2693b91079d22ca9150a3986139 [file] [log] [blame]
scroggo3e562272015-03-25 10:22:41 -07001# 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.
msarett6d0e7b22015-03-30 07:52:52 -07005
scroggo@google.com73e4d572013-05-20 22:15:32 +00006# GYP file for images project.
scroggo@google.com4c6adf92013-04-17 21:07:55 +00007{
epoger@google.comae85aea2011-05-31 13:50:51 +00008 'targets': [
9 {
10 'target_name': 'images',
borenet@google.comefb1d772012-10-10 19:45:51 +000011 'product_name': 'skia_images',
epoger@google.comae85aea2011-05-31 13:50:51 +000012 'type': 'static_library',
borenet@google.comefb1d772012-10-10 19:45:51 +000013 'standalone_static_library': 1,
bungeman@google.com9df621d2011-06-23 21:43:52 +000014 'dependencies': [
bungeman@google.comb8f36552013-07-22 14:39:45 +000015 'core.gyp:*',
msarett6d0e7b22015-03-30 07:52:52 -070016 'giflib.gyp:giflib',
msarettb747b902015-11-06 11:15:49 -080017 'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector',
robertphillips@google.com8cf81e02014-05-22 18:40:29 +000018 'etc1.gyp:libetc1',
krajcevski99ffe242014-06-03 13:04:35 -070019 'ktx.gyp:libSkKTX',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000020 'libwebp.gyp:libwebp',
bungeman@google.com9df621d2011-06-23 21:43:52 +000021 'utils.gyp:utils',
22 ],
epoger@google.comae85aea2011-05-31 13:50:51 +000023 'include_dirs': [
epoger@google.comae85aea2011-05-31 13:50:51 +000024 '../include/images',
mtkleincd1f2da2015-07-28 08:55:14 -070025 '../include/private',
halcanary@google.comad04eb42013-11-21 15:32:08 +000026 '../src/lazy',
scroggo@google.com39edf4c2013-04-25 17:33:51 +000027 # for access to SkErrorInternals.h
28 '../src/core/',
scroggo@google.comf8d7d272013-02-22 21:38:35 +000029 # for access to SkImagePriv.h
30 '../src/image/',
epoger@google.comae85aea2011-05-31 13:50:51 +000031 ],
32 'sources': [
commit-bot@chromium.org29239a02014-05-27 14:59:47 +000033 '../include/images/SkDecodingImageGenerator.h',
scroggo@google.com7def5e12013-05-31 14:00:10 +000034 '../include/images/SkForceLinking.h',
scroggo27631bd2015-06-15 09:10:03 -070035 '../src/images/SkJpegUtility.h',
epoger@google.comae85aea2011-05-31 13:50:51 +000036 '../include/images/SkMovie.h',
37 '../include/images/SkPageFlipper.h',
38
39 '../src/images/bmpdecoderhelper.cpp',
40 '../src/images/bmpdecoderhelper.h',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000041
halcanary@google.comad04eb42013-11-21 15:32:08 +000042 '../src/images/SkDecodingImageGenerator.cpp',
scroggo@google.com7def5e12013-05-31 14:00:10 +000043 '../src/images/SkForceLinking.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000044 '../src/images/SkImageDecoder.cpp',
scroggo@google.com4c6adf92013-04-17 21:07:55 +000045 '../src/images/SkImageDecoder_FactoryDefault.cpp',
46 '../src/images/SkImageDecoder_FactoryRegistrar.cpp',
scroggo@google.comd4adfa32014-02-05 16:35:12 +000047
scroggo@google.comc4ebdb02013-05-01 21:17:27 +000048 # If decoders are added/removed to/from (all/individual)
scroggo@google.com7def5e12013-05-31 14:00:10 +000049 # platform(s), be sure to update SkForceLinking.cpp
scroggo@google.comc4ebdb02013-05-01 21:17:27 +000050 # so the right decoders will be forced to link.
scroggo@google.comd4adfa32014-02-05 16:35:12 +000051
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.com8cf81e02014-05-22 18:40:29 +000060 '../src/images/SkImageDecoder_pkm.cpp',
krajcevski99ffe242014-06-03 13:04:35 -070061 '../src/images/SkImageDecoder_ktx.cpp',
krajcevski95b1b3d2014-08-07 12:58:38 -070062 '../src/images/SkImageDecoder_astc.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000063 '../src/images/SkImageDecoder_libbmp.cpp',
64 '../src/images/SkImageDecoder_libgif.cpp',
65 '../src/images/SkImageDecoder_libico.cpp',
scroggo@google.comd4adfa32014-02-05 16:35:12 +000066 '../src/images/SkImageDecoder_libwebp.cpp',
commit-bot@chromium.orga936e372013-03-14 14:42:18 +000067 '../src/images/SkImageDecoder_libjpeg.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000068 '../src/images/SkImageDecoder_libpng.cpp',
scroggo@google.comd4adfa32014-02-05 16:35:12 +000069
epoger@google.comae85aea2011-05-31 13:50:51 +000070 '../src/images/SkImageEncoder.cpp',
71 '../src/images/SkImageEncoder_Factory.cpp',
bungeman@google.com8c6a4f22013-04-23 18:06:23 +000072 '../src/images/SkImageEncoder_argb.cpp',
scroggo27631bd2015-06-15 09:10:03 -070073 '../src/images/SkJpegUtility.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000074 '../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.com242bb892011-06-22 20:42:34 +000079
reed5965c8a2015-01-07 18:04:45 -080080 '../src/ports/SkImageGenerator_skia.cpp',
81
bungeman@google.com242bb892011-06-22 20:42:34 +000082 '../src/ports/SkImageDecoder_CG.cpp',
83 '../src/ports/SkImageDecoder_WIC.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000084 ],
85 'conditions': [
epoger@google.com8846cb22011-07-01 20:20:07 +000086 [ 'skia_os == "win"', {
epoger@google.comae85aea2011-05-31 13:50:51 +000087 'sources!': [
scroggo@google.com4c6adf92013-04-17 21:07:55 +000088 '../src/images/SkImageDecoder_FactoryDefault.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000089 '../src/images/SkImageDecoder_libgif.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000090 '../src/images/SkImageDecoder_libpng.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +000091 '../src/images/SkMovie_gif.cpp',
92 ],
msarett6d0e7b22015-03-30 07:52:52 -070093 'dependencies!': [
94 'giflib.gyp:giflib'
95 ],
bsalomon@google.com897e66c2011-11-21 21:04:06 +000096 'link_settings': {
97 'libraries': [
bungeman@google.com24339aa2013-12-02 19:54:33 +000098 '-lwindowscodecs.lib',
bsalomon@google.com897e66c2011-11-21 21:04:06 +000099 ],
100 },
epoger@google.com8846cb22011-07-01 20:20:07 +0000101 },{ #else if skia_os != win
bungeman@google.com242bb892011-06-22 20:42:34 +0000102 'sources!': [
103 '../src/ports/SkImageDecoder_WIC.cpp',
104 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000105 }],
caryclark@google.com35f5ac92012-09-18 15:41:18 +0000106 [ 'skia_os in ["mac", "ios"]', {
epoger@google.comae85aea2011-05-31 13:50:51 +0000107 'sources!': [
scroggo@google.com4c6adf92013-04-17 21:07:55 +0000108 '../src/images/SkImageDecoder_FactoryDefault.cpp',
reed@google.comaf9d9c22011-06-15 17:33:29 +0000109 '../src/images/SkImageDecoder_libpng.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000110 '../src/images/SkImageDecoder_libgif.cpp',
epoger@google.comae85aea2011-05-31 13:50:51 +0000111 '../src/images/SkMovie_gif.cpp',
112 ],
epoger@google.com8846cb22011-07-01 20:20:07 +0000113 },{ #else if skia_os != mac
bungeman@google.com242bb892011-06-22 20:42:34 +0000114 'sources!': [
115 '../src/ports/SkImageDecoder_CG.cpp',
116 ],
epoger@google.comae85aea2011-05-31 13:50:51 +0000117 }],
scroggo@google.com3f178282013-04-11 22:24:35 +0000118 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +0000119 'dependencies': [
120 'libpng.gyp:libpng',
commit-bot@chromium.orgf84722e2014-02-24 20:22:34 +0000121 ],
msarett6d0e7b22015-03-30 07:52:52 -0700122 # end libpng stuff
epoger@google.comae85aea2011-05-31 13:50:51 +0000123 }],
djsollen@google.com58629292011-11-03 13:08:29 +0000124 [ 'skia_os == "android"', {
djsollen@google.com528a5562013-02-01 15:57:13 +0000125 'include_dirs': [
126 '../src/utils',
djsollen@google.com58629292011-11-03 13:08:29 +0000127 ],
msarettb747b902015-11-06 11:15:49 -0800128 'dependencies': [
129 'libpng.gyp:libpng',
130 ],
scroggo@google.comd4adfa32014-02-05 16:35:12 +0000131 'conditions': [
msarettb747b902015-11-06 11:15:49 -0800132 [ 'skia_android_framework == 1', {
djsollen38e44b02014-08-28 05:41:21 -0700133 # The android framework disables these decoders as they are of little use to
134 # Java applications that can't take advantage of the compressed formats.
135 'sources!': [
136 '../src/images/SkImageDecoder_pkm.cpp',
137 '../src/images/SkImageDecoder_ktx.cpp',
138 '../src/images/SkImageDecoder_astc.cpp',
scroggo@google.comd4adfa32014-02-05 16:35:12 +0000139 ],
140 }],
djsollen@google.combcc6d7d2013-07-23 15:51:12 +0000141 ],
djsollen@google.com58629292011-11-03 13:08:29 +0000142 }],
borenet@google.com05d550e2013-06-11 15:52:19 +0000143 [ 'skia_os == "chromeos"', {
144 'dependencies': [
msarett6d0e7b22015-03-30 07:52:52 -0700145 'libpng.gyp:libpng',
borenet@google.com05d550e2013-06-11 15:52:19 +0000146 ],
borenet@google.com05d550e2013-06-11 15:52:19 +0000147 }],
caryclark@google.com35f5ac92012-09-18 15:41:18 +0000148 [ 'skia_os == "ios"', {
149 'include_dirs': [
150 '../include/utils/mac',
151 ],
152 }],
epoger@google.comae85aea2011-05-31 13:50:51 +0000153 ],
154 'direct_dependent_settings': {
155 'include_dirs': [
156 '../include/images',
epoger@google.comae85aea2011-05-31 13:50:51 +0000157 ],
158 },
159 },
160 ],
161}