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 
     68         '../src/ports/SkImageDecoder_CG.cpp',
     69         '../src/ports/SkImageDecoder_WIC.cpp',
     70       ],
     71       'conditions': [
     72         [ 'skia_os == "win"', {
     73           'sources!': [
     74             '../src/images/SkImageDecoder_FactoryDefault.cpp',
     75             '../src/images/SkImageDecoder_libgif.cpp',
     76             '../src/images/SkImageDecoder_libpng.cpp',
     77             '../src/images/SkMovie_gif.cpp',
     78           ],
     79           'link_settings': {
     80             'libraries': [
     81               'windowscodecs.lib',
     82             ],
     83           },
     84         },{ #else if skia_os != win
     85           'sources!': [
     86             '../src/ports/SkImageDecoder_WIC.cpp',
     87           ],
     88         }],
     89         [ 'skia_os in ["mac", "ios"]', {
     90           'sources!': [
     91             '../src/images/SkImageDecoder_FactoryDefault.cpp',
     92             '../src/images/SkImageDecoder_libpng.cpp',
     93             '../src/images/SkImageDecoder_libgif.cpp',
     94             '../src/images/SkMovie_gif.cpp',
     95           ],
     96         },{ #else if skia_os != mac
     97           'sources!': [
     98             '../src/ports/SkImageDecoder_CG.cpp',
     99           ],
    100         }],
    101         [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
    102           # Any targets that depend on this target should link in libpng, libgif, and
    103           # our code that calls it.
    104           # See http://code.google.com/p/gyp/wiki/InputFormatReference#Dependent_Settings
    105           'link_settings': {
    106             'libraries': [
    107               '-lgif',
    108               '-lpng',
    109               '-lz',
    110             ],
    111           },
    112           # end libpng/libgif stuff
    113         }],
    114         # FIXME: NaCl should be just like linux, etc, above, but it currently is separated out
    115         # to remove gif. Once gif is supported by naclports, this can be merged into the above
    116         # condition.
    117         [ 'skia_os == "nacl"', {
    118           'sources!': [
    119             '../src/images/SkImageDecoder_libgif.cpp',
    120             '../src/images/SkMovie_gif.cpp',
    121           ],
    122           'link_settings': {
    123             'libraries': [
    124               '-lpng',
    125               '-lz',
    126             ],
    127           },
    128         }],
    129         [ 'skia_os == "android"', {
    130           'include_dirs': [
    131              '../src/utils',
    132           ],
    133           'dependencies': [
    134              'android_deps.gyp:gif',
    135              'android_deps.gyp:png',
    136           ],
    137           'export_dependent_settings': [
    138             'android_deps.gyp:png'
    139           ],
    140         },{ #else if skia_os != android
    141           'sources!': [
    142             '../src/images/SkImageRef_ashmem.h',
    143             '../src/images/SkImageRef_ashmem.cpp',
    144           ],
    145         }],
    146         [ 'skia_os == "chromeos"', {
    147           'dependencies': [
    148              'chromeos_deps.gyp:gif',
    149           ],
    150           'link_settings': {
    151             'libraries': [
    152               '-lpng',
    153             ],
    154           },
    155         }],
    156         [ 'skia_os == "ios"', {
    157            'include_dirs': [
    158              '../include/utils/mac',
    159            ],
    160         }],
    161       ],
    162       'direct_dependent_settings': {
    163         'include_dirs': [
    164           '../include/images',
    165           '../include/lazy',
    166         ],
    167       },
    168     },
    169   ],
    170 }
    171 
    172 # Local Variables:
    173 # tab-width:2
    174 # indent-tabs-mode:nil
    175 # End:
    176 # vim: set expandtab tabstop=2 shiftwidth=2:
    177