Another take on menu's. This uses the hosting menu scroll view container as a menuba...
[chromium-blink-merge.git] / app / app_base.gypi
blobadefed77e49bff652401a7e8a4f41430296dd078
1 # Copyright (c) 2010 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   'target_defaults': {
7     'variables': {
8       'app_base_target': 0,
9     },
10     'target_conditions': [
11       # This part is shared between the targets defined below. Only files and
12       # settings relevant for building the Win64 target should be added here.
13       # All the rest should be added to the 'app_base' target below.
14       ['app_base_target==1', {
15         'sources': [
16             # Used both for Chrome and for Win64 NaCl loader
17             'app_paths.h',
18             'app_paths.cc',
19             'app_switches.h',
20             'app_switches.cc',
21             'hi_res_timer_manager_posix.cc',
22             'hi_res_timer_manager_win.cc',
23             'hi_res_timer_manager.h',
24             'system_monitor.cc',
25             'system_monitor.h',
26             'system_monitor_posix.cc',
27             'system_monitor_win.cc',
28             'tree_model.h',
29             'tree_node_iterator.h',
30             'tree_node_model.h',
31         ],
32         'conditions': [
33           ['OS=="win"', {
34             'sources': [
35               'win_util.cc',
36               'win_util.h',
37               'win_util_path.cc',
38             ],
39           }],
40           ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', {
41             'sources!': [
42               'gtk_dnd_util.cc',
43               'gtk_dnd_util.h',
44               'gtk_signal.h',
45               'gtk_signal_registrar.cc',
46               'gtk_signal_registrar.h',
47               'gtk_util.cc',
48               'gtk_util.h',
49               'x11_util.cc',
50               'x11_util.h',
51               'x11_util_internal.h',
52             ],
53           }],
54         ],
55       }],
56     ],
57   },
58   'targets': [
59     {
60       'target_name': 'app_base',
61       'type': '<(library)',
62       'msvs_guid': '4631946D-7D5F-44BD-A5A8-504C0A7033BE',
63       'variables': {
64         'app_base_target': 1,
65         'gl_binding_output_dir': '<(SHARED_INTERMEDIATE_DIR)/app',
66       },
67       'dependencies': [
68         # app resources and app_strings should be shared with the 64-bit
69         # target, but it doesn't work due to a bug in gyp
70         'app_resources',
71         'app_strings',
72         '../base/base.gyp:base',
73         '../base/base.gyp:base_i18n',
74         '../gfx/gfx.gyp:gfx',
75         '../net/net.gyp:net',
76         '../skia/skia.gyp:skia',
77         '../third_party/icu/icu.gyp:icui18n',
78         '../third_party/icu/icu.gyp:icuuc',
79         '../third_party/libjpeg/libjpeg.gyp:libjpeg',
80         '../third_party/libpng/libpng.gyp:libpng',
81         '../third_party/sqlite/sqlite.gyp:sqlite',
82         '../third_party/zlib/zlib.gyp:zlib',
83       ],
84       'include_dirs': [
85         '../third_party/mesa/MesaLib/include',
86         '<(gl_binding_output_dir)',
87       ],
88       # TODO(gregoryd): The direct_dependent_settings should be shared with
89       # the 64-bit target, but it doesn't work due to a bug in gyp
90       'direct_dependent_settings': {
91         'include_dirs': [
92           '..',
93           '../third_party/mesa/MesaLib/include',
94           '<(gl_binding_output_dir)',
95         ],
96       },
97       'sources': [
98         # Files that are not required for Win64 Native Client loader
99         'active_window_watcher_x.cc',
100         'active_window_watcher_x.h',
101         'animation_container.cc',
102         'animation_container.h',
103         'animation.cc',
104         'animation.h',
105         'bidi_line_iterator.cc',
106         'clipboard/clipboard.cc',
107         'clipboard/clipboard.h',
108         'clipboard/clipboard_linux.cc',
109         'clipboard/clipboard_mac.mm',
110         'clipboard/clipboard_util_win.cc',
111         'clipboard/clipboard_util_win.h',
112         'clipboard/clipboard_win.cc',
113         'clipboard/scoped_clipboard_writer.cc',
114         'clipboard/scoped_clipboard_writer.h',
115         'combobox_model.h',
116         'drag_drop_types_gtk.cc',
117         'drag_drop_types_win.cc',
118         'drag_drop_types.h',
119         'file_download_interface.h',
120         'gfx/font_util.h',
121         'gfx/font_util.cc',
122         'gfx/gl/gl_bindings.h',
123         'gfx/gl/gl_context.cc',
124         'gfx/gl/gl_context.h',
125         'gfx/gl/gl_context_linux.cc',
126         'gfx/gl/gl_context_mac.cc',
127         'gfx/gl/gl_context_osmesa.cc',
128         'gfx/gl/gl_context_osmesa.h',
129         'gfx/gl/gl_context_stub.h',
130         'gfx/gl/gl_context_win.cc',
131         'gfx/gl/gl_headers.h',
132         'gfx/gl/gl_implementation.cc',
133         'gfx/gl/gl_implementation.h',
134         'gfx/gl/gl_implementation_linux.cc',
135         'gfx/gl/gl_implementation_mac.cc',
136         'gfx/gl/gl_implementation_win.cc',
137         'gfx/gl/gl_interface.h',
138         'gfx/gl/gl_interface.cc',
139         'gfx/gl/gl_mock.h',
140         'gtk_dnd_util.cc',
141         'gtk_dnd_util.h',
142         'gtk_signal.h',
143         'gtk_signal_registrar.cc',
144         'gtk_signal_registrar.h',
145         'gtk_util.cc',
146         'gtk_util.h',
147         'l10n_util.cc',
148         'l10n_util.h',
149         'l10n_util_mac.h',
150         'l10n_util_mac.mm',
151         'l10n_util_posix.cc',
152         'l10n_util_win.cc',
153         'l10n_util_win.h',
154         'linear_animation.cc',
155         'linear_animation.h',
156         'menus/accelerator.h',
157         'menus/accelerator_gtk.h',
158         'menus/accelerator_cocoa.h',
159         'menus/button_menu_item_model.cc',
160         'menus/button_menu_item_model.h',
161         'menus/menu_model.cc',
162         'menus/menu_model.h',
163         'menus/simple_menu_model.cc',
164         'menus/simple_menu_model.h',
165         'message_box_flags.h',
166         'multi_animation.cc',
167         'multi_animation.h',
168         'os_exchange_data_provider_gtk.cc',
169         'os_exchange_data_provider_gtk.h',
170         'os_exchange_data_provider_win.cc',
171         'os_exchange_data_provider_win.h',
172         'os_exchange_data.cc',
173         'os_exchange_data.h',
174         'resource_bundle.cc',
175         'resource_bundle.h',
176         'resource_bundle_linux.cc',
177         'resource_bundle_mac.mm',
178         'resource_bundle_posix.cc',
179         'resource_bundle_win.cc',
180         'slide_animation.cc',
181         'slide_animation.h',
182         'sql/connection.cc',
183         'sql/connection.h',
184         'sql/diagnostic_error_delegate.h',
185         'sql/init_status.h',
186         'sql/meta_table.cc',
187         'sql/meta_table.h',
188         'sql/statement.cc',
189         'sql/statement.h',
190         'sql/transaction.cc',
191         'sql/transaction.h',
192         'surface/accelerated_surface_mac.cc',
193         'surface/accelerated_surface_mac.h',
194         'surface/io_surface_support_mac.cc',
195         'surface/io_surface_support_mac.h',
196         'surface/transport_dib.h',
197         'surface/transport_dib_linux.cc',
198         'surface/transport_dib_mac.cc',
199         'surface/transport_dib_win.cc',
200         'table_model.cc',
201         'table_model.h',
202         'table_model_observer.h',
203         'text_elider.cc',
204         'text_elider.h',
205         'theme_provider.cc',
206         'theme_provider.h',
207         'throb_animation.cc',
208         'throb_animation.h',
209         'tween.cc',
210         'tween.h',
211         'x11_util.cc',
212         'x11_util.h',
213         'x11_util_internal.h',
214         '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc',
215         '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h',
216         '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc',
217         '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc',
218         '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h',
219       ],
220       # hard_dependency is necessary for this target because it has actions
221       # that generate header files included by dependent targtets. The header
222       # files must be generated before the dependents are compiled. The usual
223       # semantics are to allow the two targets to build concurrently.
224       'hard_dependency': 1,
225       'actions': [
226         {
227           'action_name': 'generate_gl_bindings',
228           'inputs': [
229             'gfx/gl/generate_bindings.py',
230           ],
231           'outputs': [
232             '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc',
233             '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h',
234             '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc',
235             '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h',
236             '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc',
237             '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h',
238             '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc',
239             '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc',
240             '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h',
241             '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc',
242             '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h',
243           ],
244           'action': [
245             'python',
246             'gfx/gl/generate_bindings.py',
247             '<(gl_binding_output_dir)',
248           ],
249         },
250       ],
251       'conditions': [
252         ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
253           'dependencies': [
254             # font_gtk.cc uses fontconfig.
255             # TODO(evanm): I think this is wrong; it should just use GTK.
256             '../build/linux/system.gyp:fontconfig',
257             '../build/linux/system.gyp:gtk',
258             '../build/linux/system.gyp:x11',
259             '../build/linux/system.gyp:xext',
260           ],
261           'link_settings': {
262             'libraries': [
263               '-lXrender',  # For XRender* function calls in x11_util.cc.
264             ],
265           },
266           'conditions': [
267             ['toolkit_views==0', {
268               # Note: because of gyp predence rules this has to be defined as
269               # 'sources/' rather than 'sources!'.
270               'sources/': [
271                 ['exclude', '^os_exchange_data.cc'],
272                 ['exclude', '^os_exchange_data.h'],
273                 ['exclude', '^os_exchange_data_provider_gtk.cc'],
274                 ['exclude', '^os_exchange_data_provider_gtk.h'],
275                 ['exclude', '^drag_drop_types_gtk.cc'],
276               ],
277             }],
278             ['toolkit_views==1', {
279               # Note: because of gyp predence rules this has to be defined as
280               # 'sources/' rather than 'sources!'.
281               'sources/': [
282                 ['include', '^os_exchange_data.cc'],
283               ],
284             }],
285           ],
286         }],
287         ['OS!="win"', {
288           'sources!': [
289             'drag_drop_types.h',
290             'gfx/gdi_util.cc',
291             'gfx/gdi_util.h',
292             'gfx/icon_util.cc',
293             'gfx/icon_util.h',
294             'gfx/native_theme_win.cc',
295             'gfx/native_theme_win.h',
296             'os_exchange_data.cc',
297           ],
298         }],
299         ['OS=="linux"', {
300           'sources': [
301             'gfx/gl/gl_context_egl.cc',
302             'gfx/gl/gl_context_egl.h',
303             '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc',
304             '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h',
305             '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc',
306             '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h',
307           ],
308           'include_dirs': [
309             # We don't use angle, but pull the EGL/GLES headers from there.
310             '../third_party/angle/include',
311           ],
312           'all_dependent_settings': {
313             'defines': [
314               'GL_GLEXT_PROTOTYPES',
315             ],
316             'ldflags': [
317               '-L<(PRODUCT_DIR)',
318             ],
319             'link_settings': {
320               'libraries': [
321                 '-lX11',
322                 '-ldl',
323               ],
324             },
325           },
326         }],
327         ['OS=="mac"', {
328           'link_settings': {
329             'libraries': [
330               '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
331             ],
332           },
333         }],
334         ['OS=="win"', {
335           'include_dirs': [
336             '../third_party/angle/include',
337           ],
338           'sources': [
339             'gfx/gl/gl_context_egl.cc',
340             'gfx/gl/gl_context_egl.h',
341             '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc',
342             '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h',
343             '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc',
344             '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h',
345           ],
346         }],
347       ],
348     },
349   ],
350   'conditions': [
351     ['OS=="win"', {
352       'targets': [
353         {
354           'target_name': 'app_base_nacl_win64',
355           'type': '<(library)',
356           'msvs_guid': '4987C6F9-B230-48E5-BF91-418EAE69AD90',
357           'dependencies': [
358             # app resources and app_strings should be shared with the 32-bit
359             # target, but it doesn't work due to a bug in gyp
360             'app_resources',
361             'app_strings',
362             '../base/base.gyp:base_nacl_win64',
363           ],
364           'variables': {
365             'app_base_target': 1,
366           },
367           'defines': [
368             '<@(nacl_win64_defines)',
369           ],
370           # TODO(gregoryd): The direct_dependent_settings should be shared with
371           # the 32-bit target, but it doesn't work due to a bug in gyp
372           'direct_dependent_settings': {
373             'include_dirs': [
374               '..',
375             ],
376           },
377           'sources': [
378             'l10n_util_dummy.cc',
379             'resource_bundle_dummy.cc',
380           ],
381           'include_dirs': [
382             '../skia/config/win',
383             '../third_party/icu/public/common',
384             '../third_party/icu/public/i18n',
385             '../third_party/npapi',
386             '../third_party/skia/include/config',
387             '../third_party/skia/include/core',
388           ],
389           'configurations': {
390             'Common_Base': {
391               'msvs_target_platform': 'x64',
392             },
393           },
394         },
395       ],
396     }],
397   ],