aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp/images.gyp
blob: efeb3d2335994b9e52e7646382dd498b43f49ad1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Copyright 2015 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# GYP file for images project.
{
  'targets': [
    {
      'target_name': 'images',
      'product_name': 'skia_images',
      'type': 'static_library',
      'standalone_static_library': 1,
      'dependencies': [
        'core.gyp:*',
        'libjpeg-turbo-selector.gyp:libjpeg-turbo-selector',
        'etc1.gyp:libetc1',
        'ktx.gyp:libSkKTX',
        'libpng.gyp:libpng',
        'libwebp.gyp:libwebp',
        'utils.gyp:utils',
      ],
      'include_dirs': [
        '../include/images',
        '../include/private',
        '../src/lazy',
        # for access to SkErrorInternals.h
        '../src/core/',
        # for access to SkImagePriv.h
        '../src/image/',
      ],
      'sources': [
        '../src/images/SkKTXImageEncoder.cpp',
        '../src/images/SkWEBPImageEncoder.cpp',
        '../src/images/SkJPEGImageEncoder.cpp',
        '../src/images/SkPNGImageEncoder.cpp',

        '../src/images/SkImageEncoder.cpp',
        '../src/images/SkJPEGWriteUtility.cpp',

        '../src/ports/SkImageEncoder_CG.cpp',
        '../src/ports/SkImageEncoder_WIC.cpp',
      ],
      'conditions': [
        [ 'skia_os == "win"', {
          'link_settings': {
            'libraries': [
              '-lwindowscodecs.lib',
            ],
          },
        },{ #else if skia_os != win
          'sources!': [
            '../src/ports/SkImageEncoder_WIC.cpp',
          ],
        }],
        [ 'skia_os in ["mac", "ios"]', {
        },{ #else if skia_os != mac
          'sources!': [
            '../src/ports/SkImageEncoder_CG.cpp',
          ],
        }],
        [ 'skia_os == "android"', {
          'include_dirs': [
             '../src/utils',
          ],
          'dependencies': [
            'libpng.gyp:libpng',
          ],
          'conditions': [
            [ 'skia_android_framework == 1', {
              # The android framework disables these decoders as they are of little use to
              # Java applications that can't take advantage of the compressed formats.
              'sources!': [
                '../src/images/SkKTXImageEncoder.cpp',
              ],
            }],
          ],
        }],
        [ 'skia_os == "ios"', {
           'include_dirs': [
             '../include/utils/mac',
           ],
        }],
      ],
      'direct_dependent_settings': {
        'include_dirs': [
          '../include/images',
        ],
      },
    },
  ],
}