Blink roll 174234:174238
[chromium-blink-merge.git] / ui / ozone / ozone.gyp
blob3813b8d5c0cba6b15aadd1c332b5faf339f65e3f
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.
6   'variables': {
7     'chromium_code': 1,
8     'external_ozone_platforms': [],
9     'external_ozone_platform_files': [],
10     'external_ozone_platform_deps': [],
11     'internal_ozone_platforms': [],
12     'internal_ozone_platform_deps': [],
13   },
14   'targets': [
15     {
16       'target_name': 'ozone',
17       'type': '<(component)',
18       'dependencies': [
19         '<(DEPTH)/base/base.gyp:base',
20         '<(DEPTH)/ui/events/events.gyp:events',
21         '<(DEPTH)/ui/events/ozone/events_ozone.gyp:events_ozone',
22         '<(DEPTH)/ui/gfx/gfx.gyp:gfx',
23         '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
24         '<(DEPTH)/ui/gfx/ozone/gfx_ozone.gyp:gfx_ozone',
25         '<(DEPTH)/skia/skia.gyp:skia',
26         '<@(external_ozone_platform_deps)',
27         '<@(internal_ozone_platform_deps)',
28       ],
29       'defines': [
30         'OZONE_IMPLEMENTATION',
31       ],
32       'variables': {
33         'platform_list_file': '<(SHARED_INTERMEDIATE_DIR)/ui/ozone/ozone_platform_list.cc',
34         'ozone_platforms': [
35           '<@(external_ozone_platforms)',
36           '<@(internal_ozone_platforms)',
37         ],
38       },
39       'sources': [
40         '<(platform_list_file)',
41         # common/chromeos files are excluded automatically when building with
42         # chromeos=0, by exclusion rules in filename_rules.gypi due to the
43         # 'chromeos' folder name.
44         'common/chromeos/native_display_delegate_ozone.cc',
45         'common/chromeos/native_display_delegate_ozone.h',
46         'ozone_platform.cc',
47         'ozone_platform.h',
48         'ozone_switches.cc',
49         'ozone_switches.h',
50         '<@(external_ozone_platform_files)',
51       ],
52       'actions': [
53         {
54           'action_name': 'generate_ozone_platform_list',
55           'variables': {
56             'generator_path': 'generate_ozone_platform_list.py',
57           },
58           'inputs': [
59             '<(generator_path)',
60           ],
61           'outputs': [
62             '<(platform_list_file)',
63           ],
64           'action': [
65             'python',
66             '<(generator_path)',
67             '--output_file=<(platform_list_file)',
68             '--default=<(ozone_platform)',
69             '<@(ozone_platforms)',
70           ],
71         },
72       ],
73       'conditions': [
74         ['use_udev == 0', {
75           'sources/': [
76             ['exclude', '_udev\\.(h|cc)$'],
77           ],
78         }],
79         ['chromeos==1', {
80           'dependencies': [
81             '<(DEPTH)/ui/display/display.gyp:display_types',
82           ],
83         }],
84       ]
85     },
86   ],
87   'conditions': [
88     ['<(ozone_platform_caca) == 1', {
89       'includes': [
90         'platform/caca/caca.gypi',
91       ],
92     }],
93     ['<(ozone_platform_dri) == 1', {
94       'includes': [
95         'platform/dri/dri.gypi',
96       ],
97     }],
98     ['<(ozone_platform_egltest) == 1', {
99       'includes': [
100         'platform/egltest/egltest.gypi',
101       ],
102     }],
103     ['<(ozone_platform_test) == 1', {
104       'includes': [
105         'platform/test/test.gypi',
106       ],
107     }],
108   ],