1 # GYP file for images project. 2 { 3 'targets': [ 4 { 5 'target_name': 'images', 6 'product_name': 'skia_images', 7 'type': 'static_library', 8 'standalone_static_library': 1, 9 'dependencies': [ 10 'core.gyp:*', 11 'libjpeg.gyp:*', 12 'etc1.gyp:libetc1', 13 'ktx.gyp:libSkKTX', 14 'libwebp.gyp:libwebp', 15 'utils.gyp:utils', 16 ], 17 'conditions': [ 18 [ 'skia_android_framework == 0', { 19 'export_dependent_settings': [ 20 'libjpeg.gyp:*', 21 ], 22 }], 23 ], 24 'include_dirs': [ 25 '../include/images', 26 '../src/lazy', 27 # for access to SkErrorInternals.h 28 '../src/core/', 29 # for access to SkImagePriv.h 30 '../src/image/', 31 # So src/ports/SkImageDecoder_CG can access SkStreamHelpers.h 32 '../src/images/', 33 ], 34 'sources': [ 35 '../include/images/SkDecodingImageGenerator.h', 36 '../include/images/SkForceLinking.h', 37 '../src/images/SkJpegUtility.h', 38 '../include/images/SkMovie.h', 39 '../include/images/SkPageFlipper.h', 40 41 '../src/images/bmpdecoderhelper.cpp', 42 '../src/images/bmpdecoderhelper.h', 43 44 '../src/images/SkDecodingImageGenerator.cpp', 45 '../src/images/SkForceLinking.cpp', 46 '../src/images/SkImageDecoder.cpp', 47 '../src/images/SkImageDecoder_FactoryDefault.cpp', 48 '../src/images/SkImageDecoder_FactoryRegistrar.cpp', 49 50 # If decoders are added/removed to/from (all/individual) 51 # platform(s), be sure to update SkForceLinking.cpp 52 # so the right decoders will be forced to link. 53 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', 62 '../src/images/SkImageDecoder_pkm.cpp', 63 '../src/images/SkImageDecoder_ktx.cpp', 64 '../src/images/SkImageDecoder_libbmp.cpp', 65 '../src/images/SkImageDecoder_libgif.cpp', 66 '../src/images/SkImageDecoder_libico.cpp', 67 '../src/images/SkImageDecoder_libwebp.cpp', 68 '../src/images/SkImageDecoder_libjpeg.cpp', 69 '../src/images/SkImageDecoder_libpng.cpp', 70 71 '../src/images/SkImageEncoder.cpp', 72 '../src/images/SkImageEncoder_Factory.cpp', 73 '../src/images/SkImageEncoder_argb.cpp', 74 '../src/images/SkJpegUtility.cpp', 75 '../src/images/SkMovie.cpp', 76 '../src/images/SkMovie_gif.cpp', 77 '../src/images/SkPageFlipper.cpp', 78 '../src/images/SkScaledBitmapSampler.cpp', 79 '../src/images/SkScaledBitmapSampler.h', 80 '../src/images/SkStreamHelpers.cpp', 81 '../src/images/SkStreamHelpers.h', 82 83 '../src/ports/SkImageDecoder_CG.cpp', 84 '../src/ports/SkImageDecoder_WIC.cpp', 85 ], 86 'conditions': [ 87 [ 'skia_os == "win"', { 88 'sources!': [ 89 '../src/images/SkImageDecoder_FactoryDefault.cpp', 90 '../src/images/SkImageDecoder_libgif.cpp', 91 '../src/images/SkImageDecoder_libpng.cpp', 92 '../src/images/SkMovie_gif.cpp', 93 ], 94 'link_settings': { 95 'libraries': [ 96 '-lwindowscodecs.lib', 97 ], 98 }, 99 },{ #else if skia_os != win 100 'sources!': [ 101 '../src/ports/SkImageDecoder_WIC.cpp', 102 ], 103 }], 104 [ 'skia_os in ["mac", "ios"]', { 105 'sources!': [ 106 '../src/images/SkImageDecoder_FactoryDefault.cpp', 107 '../src/images/SkImageDecoder_libpng.cpp', 108 '../src/images/SkImageDecoder_libgif.cpp', 109 '../src/images/SkMovie_gif.cpp', 110 ], 111 },{ #else if skia_os != mac 112 'sources!': [ 113 '../src/ports/SkImageDecoder_CG.cpp', 114 ], 115 }], 116 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', { 117 'export_dependent_settings': [ 118 'libpng.gyp:libpng', 119 'giflib.gyp:giflib' 120 ], 121 'dependencies': [ 122 'libpng.gyp:libpng', 123 'giflib.gyp:giflib' 124 ], 125 # end libpng/libgif stuff 126 }], 127 # FIXME: NaCl should be just like linux, etc, above, but it currently is separated out 128 # to remove gif. Once gif is supported by naclports, this can be merged into the above 129 # condition. 130 [ 'skia_os == "nacl"', { 131 'sources!': [ 132 '../src/images/SkImageDecoder_libgif.cpp', 133 '../src/images/SkMovie_gif.cpp', 134 ], 135 }], 136 [ 'skia_os == "android"', { 137 'include_dirs': [ 138 '../src/utils', 139 ], 140 'dependencies': [ 141 'android_deps.gyp:gif', 142 'android_deps.gyp:png', 143 ], 144 'conditions': [ 145 [ 'skia_android_framework == 0', { 146 'export_dependent_settings': [ 147 'android_deps.gyp:png' 148 ], 149 }], 150 ], 151 }], 152 [ 'skia_os == "chromeos"', { 153 'dependencies': [ 154 'chromeos_deps.gyp:gif', 155 'libpng.gyp:libpng', 156 ], 157 }], 158 [ 'skia_os == "ios"', { 159 'include_dirs': [ 160 '../include/utils/mac', 161 ], 162 }], 163 ], 164 'direct_dependent_settings': { 165 'include_dirs': [ 166 '../include/images', 167 ], 168 }, 169 }, 170 ], 171 } 172