aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp/gputest.gyp
blob: 4f5550b063773d7d8e38ee44ffa382a0fcac7128 (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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Copyright 2015 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
  'targets': [
    {
      'target_name': 'skgputest',
      'product_name': 'skia_skgputest',
      'type': 'static_library',
      'standalone_static_library': 1,
      'include_dirs': [
        '../include/core',
        '../include/config',
        '../include/gpu',
        '../include/private',
        '../include/utils',
        '../src/core',
        '../src/gpu',
        '../src/utils',
        '../tools/gpu',
      ],
      'all_dependent_settings': {
        'include_dirs': [
          '../tools/gpu',
        ],
      },
      'dependencies': [
        'skia_lib.gyp:skia_lib',
      ],
      'sources': [
        '<!@(python find.py "*" ../tools/gpu)'
      ],
      'conditions': [
        [ 'skia_mesa', { 'dependencies': [ 'osmesa' ] } ],
        [ 'skia_angle', {
          'dependencies': [
            'angle.gyp:*',
          ],
          'export_dependent_settings': [
            'angle.gyp:*',
          ],
        }],
        [ 'skia_os == "linux" and skia_egl == 1', {
          'link_settings': {
            'libraries': [
              '-lEGL',
              '-lGLESv2',
            ],
          },
        }],
        [ 'skia_os == "linux" and skia_egl == 0', {
          'link_settings': {
            'libraries': [
              '-lGL',
              '-lGLU',
              '-lX11',
            ],
          },
        }],
        [ 'skia_os == "android"', {
          'defines': [
            'GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE=1',
          ],
          'link_settings': {
            'libraries': [
              '-lGLESv2',
              '-lEGL',
            ],
          },
        }],
        ['skia_os in ["linux", "win", "mac", "android", "ios"]', {
          'sources/': [ ['exclude', '_none\.(h|cpp)$'],],
        }],
        ['skia_os != "win"', {
          'sources/': [ ['exclude', '_win\.(h|cpp)$'],],
        }],
        ['skia_os != "mac"', {
          'sources/': [ ['exclude', '_mac\.(h|cpp|m|mm)$'],],
        }],
        ['skia_os != "linux"', {
          'sources/': [ ['exclude', '_glx\.(h|cpp)$'],],
        }],
        ['skia_os != "ios"', {
          'sources/': [ ['exclude', '_iOS\.(h|cpp|m|mm)$'],],
        }],
        ['skia_os != "android"', {
          'sources/': [ ['exclude', '_android\.(h|cpp)$'],],
        }],
        ['skia_egl == 0', {
          'sources/': [ ['exclude', '_egl\.(h|cpp)$'],],
        }],
        [ 'skia_mesa == 0', {
          'sources/': [
            ['exclude', '_mesa\.(h|cpp)$'],
          ],
        }],
        [ 'skia_angle == 0', {
          'sources/': [
            ['exclude', '_angle\.(h|cpp)$'],
          ],
        }],
      ],
    },
    {
      'target_name': 'osmesa',
      'type': 'none',
      'direct_dependent_settings': {
        'link_settings': { 'libraries': [ '-lOSMesa', ], },
        'conditions': [
          [ 'skia_os == "mac"', {
            'link_settings': { 'library_dirs' : [ '/opt/X11/lib' ], },
            'include_dirs': [ '/opt/X11/include', ],
          }],
        ],
      },
    },
  ],
}