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         'etc1.gyp:libetc1',
     13         'ktx.gyp:libSkKTX',
     14         'libwebp.gyp:libwebp',
     15         'utils.gyp:utils',
     16       ],
     17       'include_dirs': [
     18         '../include/images',
     19         '../src/lazy',
     20         # for access to SkErrorInternals.h
     21         '../src/core/',
     22         # for access to SkImagePriv.h
     23         '../src/image/',
     24         # So src/ports/SkImageDecoder_CG can access SkStreamHelpers.h
     25         '../src/images/',
     26       ],
     27       'sources': [
     28         '../include/images/SkDecodingImageGenerator.h',
     29         '../include/images/SkForceLinking.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/SkDecodingImageGenerator.cpp',
     38         '../src/images/SkForceLinking.cpp',
     39         '../src/images/SkImageDecoder.cpp',
     40         '../src/images/SkImageDecoder_FactoryDefault.cpp',
     41         '../src/images/SkImageDecoder_FactoryRegistrar.cpp',
     42 
     43         # If decoders are added/removed to/from (all/individual)
     44         # platform(s), be sure to update SkForceLinking.cpp
     45         # so the right decoders will be forced to link.
     46 
     47         # IMPORTANT: The build order of the SkImageDecoder_*.cpp files
     48         # defines the order image decoders are tested when decoding a
     49         # stream. The last decoder is the first one tested, so the .cpp
     50         # files should be in listed in order from the least likely to be
     51         # used, to the most likely (jpeg and png should be the last two
     52         # for instance.) As a result, they are deliberately not in
     53         # alphabetical order.
     54         '../src/images/SkImageDecoder_wbmp.cpp',
     55         '../src/images/SkImageDecoder_pkm.cpp',
     56         '../src/images/SkImageDecoder_ktx.cpp',
     57         '../src/images/SkImageDecoder_libbmp.cpp',
     58         '../src/images/SkImageDecoder_libgif.cpp',
     59         '../src/images/SkImageDecoder_libico.cpp',
     60         '../src/images/SkImageDecoder_libwebp.cpp',
     61         '../src/images/SkImageDecoder_libjpeg.cpp',
     62         '../src/images/SkImageDecoder_libpng.cpp',
     63 
     64         '../src/images/SkImageEncoder.cpp',
     65         '../src/images/SkImageEncoder_Factory.cpp',
     66         '../src/images/SkImageEncoder_argb.cpp',
     67         '../src/images/SkJpegUtility.cpp',
     68         '../src/images/SkMovie.cpp',
     69         '../src/images/SkMovie_gif.cpp',
     70         '../src/images/SkPageFlipper.cpp',
     71         '../src/images/SkScaledBitmapSampler.cpp',
     72         '../src/images/SkScaledBitmapSampler.h',
     73         '../src/images/SkStreamHelpers.cpp',
     74         '../src/images/SkStreamHelpers.h',
     75 
     76         '../src/ports/SkImageDecoder_CG.cpp',
     77         '../src/ports/SkImageDecoder_WIC.cpp',
     78       ],
     79       'conditions': [
     80         [ 'skia_os == "win"', {
     81           'sources!': [
     82             '../src/images/SkImageDecoder_FactoryDefault.cpp',
     83             '../src/images/SkImageDecoder_libgif.cpp',
     84             '../src/images/SkImageDecoder_libpng.cpp',
     85             '../src/images/SkMovie_gif.cpp',
     86           ],
     87           'link_settings': {
     88             'libraries': [
     89               '-lwindowscodecs.lib',
     90             ],
     91           },
     92         },{ #else if skia_os != win
     93           'sources!': [
     94             '../src/ports/SkImageDecoder_WIC.cpp',
     95           ],
     96         }],
     97         [ 'skia_os in ["mac", "ios"]', {
     98           'sources!': [
     99             '../src/images/SkImageDecoder_FactoryDefault.cpp',
    100             '../src/images/SkImageDecoder_libpng.cpp',
    101             '../src/images/SkImageDecoder_libgif.cpp',
    102             '../src/images/SkMovie_gif.cpp',
    103           ],
    104         },{ #else if skia_os != mac
    105           'sources!': [
    106             '../src/ports/SkImageDecoder_CG.cpp',
    107           ],
    108         }],
    109         [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
    110           'export_dependent_settings': [
    111             'libpng.gyp:libpng',
    112             'giflib.gyp:giflib'
    113           ],
    114           'dependencies': [
    115             'libpng.gyp:libpng',
    116             'giflib.gyp:giflib'
    117           ],
    118           # end libpng/libgif stuff
    119         }],
    120         # FIXME: NaCl should be just like linux, etc, above, but it currently is separated out
    121         # to remove gif. Once gif is supported by naclports, this can be merged into the above
    122         # condition.
    123         [ 'skia_os == "nacl"', {
    124           'sources!': [
    125             '../src/images/SkImageDecoder_libgif.cpp',
    126             '../src/images/SkMovie_gif.cpp',
    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           'conditions': [
    138             [ 'skia_android_framework == 0', {
    139               'export_dependent_settings': [
    140                 'android_deps.gyp:png',
    141                 'libjpeg.gyp:*'
    142               ],
    143             }, {
    144               # The android framework disables these decoders as they are of little use to
    145               # Java applications that can't take advantage of the compressed formats.
    146               'sources!': [
    147                 '../src/images/SkImageDecoder_pkm.cpp',
    148                 '../src/images/SkImageDecoder_ktx.cpp',
    149               ],
    150             }],
    151           ],
    152         }],
    153         [ 'skia_os == "chromeos"', {
    154           'dependencies': [
    155              'chromeos_deps.gyp:gif',
    156              'libpng.gyp:libpng',
    157           ],
    158         }],
    159         [ 'skia_os == "ios"', {
    160            'include_dirs': [
    161              '../include/utils/mac',
    162            ],
    163         }],
    164       ],
    165       'direct_dependent_settings': {
    166         'include_dirs': [
    167           '../include/images',
    168         ],
    169       },
    170     },
    171   ],
    172 }
    173