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