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