summaryrefslogtreecommitdiffstats
path: root/ui/ozone/ozone.gyp
blob: ca937bc21c71296957c739ba4522b793a73c8798 (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
# Copyright 2013 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.

{
  'variables': {
    'chromium_code': 1,
    'external_ozone_platforms': [],
    'external_ozone_platform_files': [],
    'external_ozone_platform_deps': [],
    'internal_ozone_platforms': [],
    'internal_ozone_platform_deps': [],
  },
  'targets': [
    {
      'target_name': 'ozone',
      'type': '<(component)',
      'dependencies': [
        '<(DEPTH)/base/base.gyp:base',
        '<(DEPTH)/ui/events/events.gyp:events',
        '<(DEPTH)/ui/events/ozone/events_ozone.gyp:events_ozone',
        '<(DEPTH)/ui/gfx/gfx.gyp:gfx',
        '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
        '<(DEPTH)/ui/gfx/ozone/gfx_ozone.gyp:gfx_ozone',
        '<(DEPTH)/skia/skia.gyp:skia',
        '<@(external_ozone_platform_deps)',
        '<@(internal_ozone_platform_deps)',
      ],
      'defines': [
        'OZONE_IMPLEMENTATION',
      ],
      'variables': {
        'platform_list_file': '<(SHARED_INTERMEDIATE_DIR)/ui/ozone/ozone_platform_list.cc',
        'ozone_platforms': [
          '<@(external_ozone_platforms)',
          '<@(internal_ozone_platforms)',
        ],
      },
      'sources': [
        '<(platform_list_file)',
        # common/chromeos files are excluded automatically when building with
        # chromeos=0, by exclusion rules in filename_rules.gypi due to the
        # 'chromeos' folder name.
        'common/chromeos/native_display_delegate_ozone.cc',
        'common/chromeos/native_display_delegate_ozone.h',
        'common/chromeos/touchscreen_device_manager_ozone.cc',
        'common/chromeos/touchscreen_device_manager_ozone.h',
        'ozone_platform.cc',
        'ozone_platform.h',
        'ozone_switches.cc',
        'ozone_switches.h',
        '<@(external_ozone_platform_files)',
      ],
      'actions': [
        {
          'action_name': 'generate_ozone_platform_list',
          'variables': {
            'generator_path': 'generate_ozone_platform_list.py',
          },
          'inputs': [
            '<(generator_path)',
          ],
          'outputs': [
            '<(platform_list_file)',
          ],
          'action': [
            'python',
            '<(generator_path)',
            '--output_file=<(platform_list_file)',
            '--default=<(ozone_platform)',
            '<@(ozone_platforms)',
          ],
        },
      ],
      'conditions': [
        ['use_udev == 0', {
          'sources/': [
            ['exclude', '_udev\\.(h|cc)$'],
          ],
        }],
        ['chromeos==1', {
          'dependencies': [
            '<(DEPTH)/ui/display/display.gyp:display_types',
          ],
        }],
      ]
    },
  ],
  'conditions': [
    ['<(ozone_platform_caca) == 1', {
      'includes': [
        'platform/caca/caca.gypi',
      ],
    }],
    ['<(ozone_platform_dri) == 1 or <(ozone_platform_gbm) == 1', {
      'includes': [
        'platform/dri/dri.gypi',
      ],
    }],
    ['<(ozone_platform_egltest) == 1', {
      'includes': [
        'platform/egltest/egltest.gypi',
      ],
    }],
    ['<(ozone_platform_gbm) == 1', {
      'includes': [
        'platform/dri/gbm.gypi',
      ],
    }],
    ['<(ozone_platform_test) == 1', {
      'includes': [
        'platform/test/test.gypi',
      ],
    }],
  ],
}