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