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