summaryrefslogtreecommitdiff
path: root/skia/skia.gyp
blob: 29f546493833b1898522ce99d596c6b7160e76a4 (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
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

{
  'conditions': [
    # In component mode (shared_lib), we build all of skia as a single DLL.
    # However, in the static mode, we need to build skia as multiple targets
    # in order to support the use case where a platform (e.g. Android) may
    # already have a copy of skia as a system library.
    ['component=="static_library"', {
      'targets': [
        {
          'target_name': 'skia_library',
          'type': 'static_library',
          # The optimize: 'max' scattered throughout are particularly
          # important when compiled by MSVC 2013, which seems
          # to mis-link-time-compile code that's built with
          # different optimization levels. http://crbug.com/543583
          'variables': {
            'optimize': 'max',
          },
          'includes': [
            'skia_common.gypi',
            'skia_library.gypi',
          ],
        },
      ],
    }],
    ['component=="static_library"', {
      'targets': [
        {
          'target_name': 'skia',
          # The optimize: 'max' scattered throughout are particularly
          # important when compiled by MSVC 2013, which seems
          # to mis-link-time-compile code that's built with
          # different optimization levels. http://crbug.com/543583
          'variables': {
            'optimize': 'max',
          },
          'type': 'none',
          'dependencies': [
            'skia_library',
            'skia_pdfium',
          ],
          'export_dependent_settings': [
            'skia_library',
            'skia_pdfium',
          ],
          'direct_dependent_settings': {
            'conditions': [
              [ 'OS == "win"', {
                'defines': [
                  'GR_GL_FUNCTION_TYPE=__stdcall',
                ],
              }],
            ],
          },
        },
        {
          'target_name': 'skia_pdfium',
          'type': 'static_library',
          'includes': [
            'skia_pdfium.gypi',
            'skia_common.gypi',
          ],
        },
      ],
    }],
  ],
}