images.gyp revision d4adfa37fb33fa0779da6401d7befbee14bb49df
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 'libwebp.gyp:libwebp', 13 'utils.gyp:utils', 14 ], 15 'conditions': [ 16 [ 'skia_android_framework == 0', { 17 'export_dependent_settings': [ 18 'libjpeg.gyp:*', 19 ], 20 }], 21 ], 22 'include_dirs': [ 23 '../include/images', 24 '../src/lazy', 25 # for access to SkErrorInternals.h 26 '../src/core/', 27 # for access to SkImagePriv.h 28 '../src/image/', 29 # So src/ports/SkImageDecoder_CG can access SkStreamHelpers.h 30 '../src/images/', 31 ], 32 'sources': [ 33 '../include/images/SkForceLinking.h', 34 '../include/images/SkImageRef.h', 35 '../include/images/SkImageRef_GlobalPool.h', 36 '../src/images/SkJpegUtility.h', 37 '../include/images/SkMovie.h', 38 '../include/images/SkPageFlipper.h', 39 40 '../src/images/bmpdecoderhelper.cpp', 41 '../src/images/bmpdecoderhelper.h', 42 43 '../src/images/SkDecodingImageGenerator.cpp', 44 '../src/images/SkDecodingImageGenerator.h', 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_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/SkImageRef.cpp', 73 '../src/images/SkImageRefPool.cpp', 74 '../src/images/SkImageRefPool.h', 75 '../src/images/SkImageRef_ashmem.h', 76 '../src/images/SkImageRef_ashmem.cpp', 77 '../src/images/SkImageRef_GlobalPool.cpp', 78 '../src/images/SkImages.cpp', 79 '../src/images/SkJpegUtility.cpp', 80 '../src/images/SkMovie.cpp', 81 '../src/images/SkMovie_gif.cpp', 82 '../src/images/SkPageFlipper.cpp', 83 '../src/images/SkScaledBitmapSampler.cpp', 84 '../src/images/SkScaledBitmapSampler.h', 85 '../src/images/SkStreamHelpers.cpp', 86 '../src/images/SkStreamHelpers.h', 87 88 '../src/ports/SkImageDecoder_CG.cpp', 89 '../src/ports/SkImageDecoder_WIC.cpp', 90 ], 91 'conditions': [ 92 [ 'skia_os == "win"', { 93 'sources!': [ 94 '../src/images/SkImageDecoder_FactoryDefault.cpp', 95 '../src/images/SkImageDecoder_libgif.cpp', 96 '../src/images/SkImageDecoder_libpng.cpp', 97 '../src/images/SkMovie_gif.cpp', 98 ], 99 'link_settings': { 100 'libraries': [ 101 '-lwindowscodecs.lib', 102 ], 103 }, 104 },{ #else if skia_os != win 105 'sources!': [ 106 '../src/ports/SkImageDecoder_WIC.cpp', 107 ], 108 }], 109 [ 'skia_os in ["mac", "ios"]', { 110 'sources!': [ 111 '../src/images/SkImageDecoder_FactoryDefault.cpp', 112 '../src/images/SkImageDecoder_libpng.cpp', 113 '../src/images/SkImageDecoder_libgif.cpp', 114 '../src/images/SkMovie_gif.cpp', 115 ], 116 },{ #else if skia_os != mac 117 'sources!': [ 118 '../src/ports/SkImageDecoder_CG.cpp', 119 ], 120 }], 121 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', { 122 # Any targets that depend on this target should link in libpng, libgif, and 123 # our code that calls it. 124 # See http://code.google.com/p/gyp/wiki/InputFormatReference#Dependent_Settings 125 'link_settings': { 126 'libraries': [ 127 '-lgif', 128 '-lpng', 129 '-lz', 130 ], 131 }, 132 # end libpng/libgif stuff 133 }], 134 # FIXME: NaCl should be just like linux, etc, above, but it currently is separated out 135 # to remove gif. Once gif is supported by naclports, this can be merged into the above 136 # condition. 137 [ 'skia_os == "nacl"', { 138 'sources!': [ 139 '../src/images/SkImageDecoder_libgif.cpp', 140 '../src/images/SkMovie_gif.cpp', 141 ], 142 'link_settings': { 143 'libraries': [ 144 '-lpng', 145 '-lz', 146 ], 147 }, 148 }], 149 [ 'skia_os == "android"', { 150 'include_dirs': [ 151 '../src/utils', 152 ], 153 'dependencies': [ 154 'android_deps.gyp:gif', 155 'android_deps.gyp:png', 156 ], 157 'conditions': [ 158 [ 'skia_android_framework == 0', { 159 'export_dependent_settings': [ 160 'android_deps.gyp:png' 161 ], 162 }], 163 ], 164 },{ #else if skia_os != android 165 'sources!': [ 166 '../src/images/SkImageRef_ashmem.h', 167 '../src/images/SkImageRef_ashmem.cpp', 168 ], 169 }], 170 [ 'skia_os == "chromeos"', { 171 'dependencies': [ 172 'chromeos_deps.gyp:gif', 173 ], 174 'link_settings': { 175 'libraries': [ 176 '-lpng', 177 ], 178 }, 179 }], 180 [ 'skia_os == "ios"', { 181 'include_dirs': [ 182 '../include/utils/mac', 183 ], 184 }], 185 ], 186 'direct_dependent_settings': { 187 'include_dirs': [ 188 '../include/images', 189 ], 190 }, 191 }, 192 ], 193} 194