• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2012 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5{
6  'conditions': [
7    # In component mode (shared_lib), we build all of skia as a single DLL.
8    # However, in the static mode, we need to build skia as multiple targets
9    # in order to support the use case where a platform (e.g. Android) may
10    # already have a copy of skia as a system library.
11    ['component=="static_library" and use_system_skia==0', {
12      'targets': [
13        {
14          'target_name': 'skia_library',
15          'type': 'static_library',
16          'includes': [
17            'skia_library.gypi',
18            'skia_common.gypi',
19            '../build/android/increase_size_for_speed.gypi',
20          ],
21        },
22      ],
23    }],
24    ['component=="static_library" and use_system_skia==1', {
25      'targets': [
26        {
27          'target_name': 'skia_library',
28          'type': 'none',
29          'includes': [
30            'skia_system.gypi',
31            '../build/android/increase_size_for_speed.gypi',
32          ],
33        },
34      ],
35    }],
36    ['component=="static_library"', {
37      'targets': [
38        {
39          'target_name': 'skia',
40          'type': 'none',
41          'dependencies': [
42            'skia_library',
43            'skia_chrome',
44          ],
45          'export_dependent_settings': [
46            'skia_library',
47            'skia_chrome',
48          ],
49        },
50        {
51          'target_name': 'skia_chrome',
52          'type': 'static_library',
53          'includes': [
54            'skia_chrome.gypi',
55            'skia_common.gypi',
56            '../build/android/increase_size_for_speed.gypi',
57          ],
58        },
59      ],
60    },
61    {  # component != static_library
62      'targets': [
63        {
64          'target_name': 'skia',
65          'type': 'shared_library',
66          'includes': [
67            'skia_library.gypi',
68            'skia_chrome.gypi',
69            'skia_common.gypi',
70            '../build/android/increase_size_for_speed.gypi',
71          ],
72          'defines': [
73            'SKIA_DLL',
74            'SKIA_IMPLEMENTATION=1',
75            'GR_GL_IGNORE_ES3_MSAA=0',
76          ],
77          'direct_dependent_settings': {
78            'defines': [
79              'SKIA_DLL',
80              'GR_GL_IGNORE_ES3_MSAA=0',
81            ],
82          },
83        },
84        {
85          'target_name': 'skia_library',
86          'type': 'none',
87        },
88        {
89          'target_name': 'skia_chrome',
90          'type': 'none',
91        },
92      ],
93    }],
94  ],
95
96  # targets that are not dependent upon the component type
97  'targets': [
98    {
99      'target_name': 'skia_chrome_opts',
100      'type': 'static_library',
101      'include_dirs': [
102        '..',
103        'config',
104        '../third_party/skia/include/core',
105      ],
106      'conditions': [
107        [ 'os_posix == 1 and OS != "mac" and OS != "android" and \
108            target_arch != "arm" and target_arch != "mipsel" and \
109            target_arch != "arm64" and target_arch != "mips64el"', {
110          'cflags': [
111            '-msse2',
112          ],
113        }],
114        [ 'target_arch != "arm" and target_arch != "mipsel" and \
115           target_arch != "arm64" and target_arch != "mips64el"', {
116          'sources': [
117            'ext/convolver_SSE2.cc',
118          ],
119        }],
120        [ 'target_arch == "mipsel"',{
121          'cflags': [
122            '-fomit-frame-pointer',
123          ],
124          'sources': [
125            'ext/convolver_mips_dspr2.cc',
126          ],
127        }],
128      ],
129    },
130    {
131      'target_name': 'image_operations_bench',
132      'type': 'executable',
133      'dependencies': [
134        '../base/base.gyp:base',
135        'skia',
136      ],
137      'include_dirs': [
138        '..',
139      ],
140      'sources': [
141        'ext/image_operations_bench.cc',
142      ],
143    },
144    {
145      'target_name': 'filter_fuzz_stub',
146      'type': 'executable',
147      'dependencies': [
148        '../base/base.gyp:base',
149        'skia.gyp:skia',
150      ],
151      'sources': [
152        'tools/filter_fuzz_stub/filter_fuzz_stub.cc',
153      ],
154      'includes': [
155        '../build/android/increase_size_for_speed.gypi',
156      ],
157    },
158  ],
159}
160