Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ui / ozone / ozone.gyp
blob123ea2a9e6b8fff5b67ef692ecdc2882553d3dd5
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     'external_ozone_platform_unittest_deps': [],
12     'internal_ozone_platforms': [],
13     'internal_ozone_platform_deps': [],
14     'internal_ozone_platform_unittest_deps': [],
15   },
16   'targets': [
17     {
18       # GN version: //ui/ozone:ozone_base
19       'target_name': 'ozone_base',
20       'type': '<(component)',
21       'dependencies': [
22         '<(DEPTH)/base/base.gyp:base',
23         '<(DEPTH)/skia/skia.gyp:skia',
24         '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
25       ],
26       'defines': [
27         'OZONE_BASE_IMPLEMENTATION',
28       ],
29       'sources': [
30         'public/cursor_factory_ozone.cc',
31         'public/cursor_factory_ozone.h',
32         'public/gpu_platform_support.cc',
33         'public/gpu_platform_support.h',
34         'public/gpu_platform_support_host.cc',
35         'public/gpu_platform_support_host.h',
36         'public/native_pixmap.h',
37         'public/overlay_candidates_ozone.cc',
38         'public/overlay_candidates_ozone.h',
39         'public/surface_factory_ozone.cc',
40         'public/surface_factory_ozone.h',
41         'public/surface_ozone_canvas.h',
42         'public/surface_ozone_egl.h',
43       ],
44     },
45     {
46       # GN version: //ui/ozone
47       'target_name': 'ozone',
48       'type': '<(component)',
49       'dependencies': [
50         '<(DEPTH)/base/base.gyp:base',
51         '<(DEPTH)/ipc/ipc.gyp:ipc',
52         '<(DEPTH)/skia/skia.gyp:skia',
53         '<(DEPTH)/ui/events/events.gyp:events',
54         '<(DEPTH)/ui/events/ozone/events_ozone.gyp:events_ozone',
55         '<(DEPTH)/ui/gfx/gfx.gyp:gfx',
56         '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
57         '<(DEPTH)/ui/gfx/ipc/gfx_ipc.gyp:gfx_ipc',
58         '<@(external_ozone_platform_deps)',
59         '<@(internal_ozone_platform_deps)',
60         'ozone_base',
61       ],
62       'defines': [
63         'OZONE_IMPLEMENTATION',
64       ],
65       'variables': {
66         'platform_list_cc_file': '<(INTERMEDIATE_DIR)/ui/ozone/platform_list.cc',
67         'platform_list_h_file': '<(SHARED_INTERMEDIATE_DIR)/ui/ozone/platform_list.h',
68         'platform_list_txt_file': '<(SHARED_INTERMEDIATE_DIR)/ui/ozone/platform_list.txt',
69         'constructor_list_cc_file': '<(INTERMEDIATE_DIR)/ui/ozone/constructor_list.cc',
70         'ozone_platforms': [
71           '<@(external_ozone_platforms)',
72           '<@(internal_ozone_platforms)',
73         ],
74       },
75       'include_dirs': [
76         '<(SHARED_INTERMEDIATE_DIR)',
77       ],
78       'sources': [
79         '<(platform_list_cc_file)',
80         '<(platform_list_h_file)',
81         '<(constructor_list_cc_file)',
83         # common/chromeos files are excluded automatically when building with
84         # chromeos=0, by exclusion rules in filename_rules.gypi due to the
85         # 'chromeos' folder name.
86         'common/chromeos/display_mode_proxy.cc',
87         'common/chromeos/display_mode_proxy.h',
88         'common/chromeos/display_snapshot_proxy.cc',
89         'common/chromeos/display_snapshot_proxy.h',
90         'common/chromeos/display_util.cc',
91         'common/chromeos/display_util.h',
92         'common/chromeos/native_display_delegate_ozone.cc',
93         'common/chromeos/native_display_delegate_ozone.h',
94         'common/chromeos/touchscreen_device_manager_ozone.cc',
95         'common/chromeos/touchscreen_device_manager_ozone.h',
96         'common/gpu/ozone_gpu_message_generator.cc',
97         'common/gpu/ozone_gpu_message_generator.h',
98         'common/gpu/ozone_gpu_message_params.cc',
99         'common/gpu/ozone_gpu_message_params.h',
100         'common/gpu/ozone_gpu_messages.h',
101         'public/ozone_platform.cc',
102         'public/ozone_platform.h',
103         'public/ozone_switches.cc',
104         'public/ozone_switches.h',
105         'platform_selection.cc',
106         'platform_selection.h',
107         '<@(external_ozone_platform_files)',
108       ],
109       'actions': [
110         {
111           # GN version: //ui/ozone:generate_ozone_platform_list
112           'action_name': 'generate_ozone_platform_list',
113           'variables': {
114             'generator_path': 'generate_ozone_platform_list.py',
115           },
116           'inputs': [
117             '<(generator_path)',
118           ],
119           'outputs': [
120             '<(platform_list_cc_file)',
121             '<(platform_list_h_file)',
122             '<(platform_list_txt_file)',
123           ],
124           'action': [
125             'python',
126             '<(generator_path)',
127             '--output_cc=<(platform_list_cc_file)',
128             '--output_h=<(platform_list_h_file)',
129             '--output_txt=<(platform_list_txt_file)',
130             '--default=<(ozone_platform)',
131             '<@(ozone_platforms)',
132           ],
133         },
134         {
135           # GN version: //ui/ozone:generate_constructor_list
136           'action_name': 'generate_constructor_list',
137           'variables': {
138             'generator_path': 'generate_constructor_list.py',
139           },
140           'inputs': [
141             '<(generator_path)',
142             '<(platform_list_txt_file)',
143           ],
144           'outputs': [
145             '<(constructor_list_cc_file)',
146           ],
147           'action': [
148             'python',
149             '<(generator_path)',
150             '--platform_list=<(platform_list_txt_file)',
151             '--output_cc=<(constructor_list_cc_file)',
152             '--namespace=ui',
153             '--typename=OzonePlatform',
154             '--include="ui/ozone/public/ozone_platform.h"'
155           ],
156         },
157       ],
158       'conditions': [
159         ['use_udev == 0', {
160           'sources/': [
161             ['exclude', '_udev\\.(h|cc)$'],
162           ],
163         }],
164         ['chromeos==1', {
165           'dependencies': [
166             '<(DEPTH)/ui/display/display.gyp:display_types',
167           ],
168         }],
169       ],
170     },
171     {
172       'target_name': 'ozone_unittests',
173       'type': '<(gtest_target_type)',
174       'sources': [
175         'run_all_unittests.cc',
176       ],
177       'dependencies': [
178         'ozone_base',
179         '../../base/base.gyp:base',
180         '../../base/base.gyp:test_support_base',
181         '../../testing/gtest.gyp:gtest',
182         '<@(external_ozone_platform_unittest_deps)',
183         '<@(internal_ozone_platform_unittest_deps)',
184       ],
185     },
186   ],
187   'conditions': [
188     ['<(ozone_platform_caca) == 1', {
189       'includes': [
190         'platform/caca/caca.gypi',
191       ],
192     }],
193     ['<(ozone_platform_dri) == 1 or <(ozone_platform_gbm) == 1', {
194       'includes': [
195         'platform/dri/dri.gypi',
196       ],
197     }],
198     ['<(ozone_platform_egltest) == 1', {
199       'includes': [
200         'platform/egltest/egltest.gypi',
201       ],
202     }],
203     ['<(ozone_platform_gbm) == 1', {
204       'includes': [
205         'platform/dri/gbm.gypi',
206       ],
207     }],
208     ['<(ozone_platform_test) == 1', {
209       'includes': [
210         'platform/test/test.gypi',
211       ],
212     }],
213   ],