1# 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. 5 6# GYP file for images project. 7{ 8 'targets': [ 9 { 10 'target_name': 'images', 11 'product_name': 'skia_images', 12 'type': 'static_library', 13 'standalone_static_library': 1, 14 'dependencies': [ 15 'core.gyp:*', 16 'giflib.gyp:giflib', 17 'libjpeg.gyp:*', 18 'etc1.gyp:libetc1', 19 'ktx.gyp:libSkKTX', 20 'libwebp.gyp:libwebp', 21 'utils.gyp:utils', 22 ], 23 'include_dirs': [ 24 '../include/images', 25 '../src/lazy', 26 # for access to SkErrorInternals.h 27 '../src/core/', 28 # for access to SkImagePriv.h 29 '../src/image/', 30 ], 31 'sources': [ 32 '../include/images/SkDecodingImageGenerator.h', 33 '../include/images/SkForceLinking.h', 34 '../src/images/SkJpegUtility.h', 35 '../include/images/SkMovie.h', 36 '../include/images/SkPageFlipper.h', 37 38 '../src/images/bmpdecoderhelper.cpp', 39 '../src/images/bmpdecoderhelper.h', 40 41 '../src/images/SkDecodingImageGenerator.cpp', 42 '../src/images/SkForceLinking.cpp', 43 '../src/images/SkImageDecoder.cpp', 44 '../src/images/SkImageDecoder_FactoryDefault.cpp', 45 '../src/images/SkImageDecoder_FactoryRegistrar.cpp', 46 47 # If decoders are added/removed to/from (all/individual) 48 # platform(s), be sure to update SkForceLinking.cpp 49 # so the right decoders will be forced to link. 50 51 # IMPORTANT: The build order of the SkImageDecoder_*.cpp files 52 # defines the order image decoders are tested when decoding a 53 # stream. The last decoder is the first one tested, so the .cpp 54 # files should be in listed in order from the least likely to be 55 # used, to the most likely (jpeg and png should be the last two 56 # for instance.) As a result, they are deliberately not in 57 # alphabetical order. 58 '../src/images/SkImageDecoder_wbmp.cpp', 59 '../src/images/SkImageDecoder_pkm.cpp', 60 '../src/images/SkImageDecoder_ktx.cpp', 61 '../src/images/SkImageDecoder_astc.cpp', 62 '../src/images/SkImageDecoder_libbmp.cpp', 63 '../src/images/SkImageDecoder_libgif.cpp', 64 '../src/images/SkImageDecoder_libico.cpp', 65 '../src/images/SkImageDecoder_libwebp.cpp', 66 '../src/images/SkImageDecoder_libjpeg.cpp', 67 '../src/images/SkImageDecoder_libpng.cpp', 68 69 '../src/images/SkImageEncoder.cpp', 70 '../src/images/SkImageEncoder_Factory.cpp', 71 '../src/images/SkImageEncoder_argb.cpp', 72 '../src/images/SkJpegUtility.cpp', 73 '../src/images/SkMovie.cpp', 74 '../src/images/SkMovie_gif.cpp', 75 '../src/images/SkPageFlipper.cpp', 76 '../src/images/SkScaledBitmapSampler.cpp', 77 '../src/images/SkScaledBitmapSampler.h', 78 79 '../src/ports/SkImageGenerator_skia.cpp', 80 81 '../src/ports/SkImageDecoder_CG.cpp', 82 '../src/ports/SkImageDecoder_WIC.cpp', 83 ], 84 'conditions': [ 85 [ 'skia_os == "win"', { 86 'sources!': [ 87 '../src/images/SkImageDecoder_FactoryDefault.cpp', 88 '../src/images/SkImageDecoder_libgif.cpp', 89 '../src/images/SkImageDecoder_libpng.cpp', 90 '../src/images/SkMovie_gif.cpp', 91 ], 92 'dependencies!': [ 93 'giflib.gyp:giflib' 94 ], 95 'link_settings': { 96 'libraries': [ 97 '-lwindowscodecs.lib', 98 ], 99 }, 100 },{ #else if skia_os != win 101 'sources!': [ 102 '../src/ports/SkImageDecoder_WIC.cpp', 103 ], 104 }], 105 [ 'skia_os in ["mac", "ios"]', { 106 'sources!': [ 107 '../src/images/SkImageDecoder_FactoryDefault.cpp', 108 '../src/images/SkImageDecoder_libpng.cpp', 109 '../src/images/SkImageDecoder_libgif.cpp', 110 '../src/images/SkMovie_gif.cpp', 111 ], 112 },{ #else if skia_os != mac 113 'sources!': [ 114 '../src/ports/SkImageDecoder_CG.cpp', 115 ], 116 }], 117 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', { 118 'export_dependent_settings': [ 119 'libpng.gyp:libpng', 120 ], 121 'dependencies': [ 122 'libpng.gyp:libpng', 123 ], 124 # end libpng stuff 125 }], 126 [ 'skia_os == "android"', { 127 'include_dirs': [ 128 '../src/utils', 129 ], 130 'dependencies': [ 131 'android_deps.gyp:png', 132 ], 133 'conditions': [ 134 [ 'skia_android_framework == 0', { 135 'export_dependent_settings': [ 136 'android_deps.gyp:png', 137 'libjpeg.gyp:*' 138 ], 139 }, { 140 # The android framework disables these decoders as they are of little use to 141 # Java applications that can't take advantage of the compressed formats. 142 'sources!': [ 143 '../src/images/SkImageDecoder_pkm.cpp', 144 '../src/images/SkImageDecoder_ktx.cpp', 145 '../src/images/SkImageDecoder_astc.cpp', 146 ], 147 }], 148 ], 149 }], 150 [ 'skia_os == "chromeos"', { 151 'dependencies': [ 152 'libpng.gyp:libpng', 153 ], 154 }], 155 [ 'skia_os == "ios"', { 156 'include_dirs': [ 157 '../include/utils/mac', 158 ], 159 }], 160 ], 161 'direct_dependent_settings': { 162 'include_dirs': [ 163 '../include/images', 164 ], 165 }, 166 }, 167 ], 168} 169