• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2013 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  'variables': {
7    'chromium_code': 1,
8    'external_ozone_platforms': [],
9    'external_ozone_platform_files': [],
10    'external_ozone_platform_deps': [],
11  },
12  'targets': [
13    {
14      'target_name': 'ozone',
15      'type': '<(component)',
16      'dependencies': [
17        '<(DEPTH)/base/base.gyp:base',
18        '<(DEPTH)/ui/events/events.gyp:events',
19        '<(DEPTH)/ui/gfx/gfx.gyp:gfx',
20        '<(DEPTH)/skia/skia.gyp:skia',
21        '<@(external_ozone_platform_deps)',
22      ],
23      'defines': [
24        'OZONE_IMPLEMENTATION',
25      ],
26      'variables': {
27        'platform_list_file': '<(SHARED_INTERMEDIATE_DIR)/ui/ozone/ozone_platform_list.cc',
28        'ozone_platforms': [
29          '<@(external_ozone_platforms)',
30        ],
31      },
32      'sources': [
33        '<(platform_list_file)',
34        'ozone_platform.cc',
35        'ozone_platform.h',
36        'ozone_switches.cc',
37        'ozone_switches.h',
38        'platform/dri/ozone_platform_dri.cc',
39        'platform/dri/ozone_platform_dri.h',
40        'platform/test/ozone_platform_test.cc',
41        'platform/test/ozone_platform_test.h',
42        '<@(external_ozone_platform_files)',
43      ],
44      'actions': [
45        {
46          'action_name': 'generate_ozone_platform_list',
47          'variables': {
48            'generator_path': 'generate_ozone_platform_list.py',
49          },
50          'inputs': [
51            '<(generator_path)',
52          ],
53          'outputs': [
54            '<(platform_list_file)',
55          ],
56          'action': [
57            'python',
58            '<(generator_path)',
59            '--output_file=<(platform_list_file)',
60            '--default=<(ozone_platform)',
61            '<@(ozone_platforms)',
62          ],
63        },
64      ],
65      'conditions': [
66        ['<(ozone_platform_dri)==1', {
67          'variables': {
68            'ozone_platforms': [
69              'dri'
70            ]
71          }
72        }, {  # ozone_platform_dri==0
73          'sources/': [
74            ['exclude', '^platform/dri/'],
75          ]
76        }],
77        ['<(ozone_platform_test)==1', {
78          'variables': {
79            'ozone_platforms': [
80              'test'
81            ],
82          }
83        }, {  # ozone_platform_test==0
84          'sources/': [
85            ['exclude', '^platform/test/'],
86          ]
87        }],
88      ]
89    },
90  ],
91}
92