OLD | NEW |
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'variables': { | 6 'variables': { |
7 'chromium_code': 1, | 7 'chromium_code': 1, |
8 'toolkit_views2': 0, # ui/views/ is an experimental framework on Windows. | 8 'toolkit_views2': 0, # ui/views/ is an experimental framework on Windows. |
9 }, | 9 }, |
10 'target_defaults': { | 10 'target_defaults': { |
11 'conditions': [ | 11 'conditions': [ |
12 ['OS=="win"', | 12 ['OS=="win"', |
13 {'variables': {'toolkit_views2': 1}}, | 13 {'variables': {'toolkit_views2': 1}}, |
14 ], | 14 ], |
15 ['toolkit_views2==0', {'sources/': [ | 15 ['toolkit_views2==0', {'sources/': [ |
16 ['exclude', 'views/'], | 16 ['exclude', 'views/'], |
17 ]}], | 17 ]}], |
18 ['touchui==0', {'sources/': [ | 18 ['touchui==0', {'sources/': [ |
19 ['exclude', 'event_x.cc$'], | 19 ['exclude', 'event_x.cc$'], |
20 ['exclude', 'native_menu_x.cc$'], | 20 ['exclude', 'native_menu_x.cc$'], |
21 ['exclude', 'native_menu_x.h$'], | 21 ['exclude', 'native_menu_x.h$'], |
22 ['exclude', 'touchui/'], | 22 ['exclude', 'touchui/'], |
23 ['exclude', '_(touch)\\.cc$'], | 23 ['exclude', '_(touch)\\.cc$'], |
24 ]}], | 24 ]}], |
25 ], | 25 ], |
26 }, | 26 }, |
27 'includes': [ | 27 'includes': [ |
28 'ui_base.gypi', | |
29 'ui_gfx.gypi', | |
30 'ui_resources.gypi', | 28 'ui_resources.gypi', |
31 ], | 29 ], |
| 30 'targets': [ |
| 31 { |
| 32 'target_name': 'ui', |
| 33 'type': '<(component)', |
| 34 'dependencies': [ |
| 35 '../base/base.gyp:base', |
| 36 '../base/base.gyp:base_i18n', |
| 37 '../base/base.gyp:base_static', |
| 38 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic
_annotations', |
| 39 '../build/temp_gyp/googleurl.gyp:googleurl', |
| 40 '../net/net.gyp:net', |
| 41 '../skia/skia.gyp:skia', |
| 42 '../third_party/icu/icu.gyp:icui18n', |
| 43 '../third_party/icu/icu.gyp:icuuc', |
| 44 '../third_party/libpng/libpng.gyp:libpng', |
| 45 '../third_party/zlib/zlib.gyp:zlib', |
| 46 'base/strings/ui_strings.gyp:ui_strings', |
| 47 'gfx_resources', |
| 48 '<(libjpeg_gyp_path):libjpeg', |
| 49 ], |
| 50 # Export these dependencies since text_elider.h includes ICU headers. |
| 51 'export_dependent_settings': [ |
| 52 '../net/net.gyp:net', |
| 53 '../third_party/icu/icu.gyp:icui18n', |
| 54 '../third_party/icu/icu.gyp:icuuc', |
| 55 ], |
| 56 'sources': [ |
| 57 'base/accessibility/accessibility_types.h', |
| 58 'base/accessibility/accessible_view_state.cc', |
| 59 'base/accessibility/accessible_view_state.h', |
| 60 'base/animation/animation.cc', |
| 61 'base/animation/animation.h', |
| 62 'base/animation/animation_container.cc', |
| 63 'base/animation/animation_container.h', |
| 64 'base/animation/animation_container_element.h', |
| 65 'base/animation/animation_container_observer.h', |
| 66 'base/animation/animation_delegate.h', |
| 67 'base/animation/linear_animation.cc', |
| 68 'base/animation/linear_animation.h', |
| 69 'base/animation/multi_animation.cc', |
| 70 'base/animation/multi_animation.h', |
| 71 'base/animation/slide_animation.cc', |
| 72 'base/animation/slide_animation.h', |
| 73 'base/animation/throb_animation.cc', |
| 74 'base/animation/throb_animation.h', |
| 75 'base/animation/tween.cc', |
| 76 'base/animation/tween.h', |
| 77 'base/clipboard/clipboard.cc', |
| 78 'base/clipboard/clipboard.h', |
| 79 'base/clipboard/clipboard_linux.cc', |
| 80 'base/clipboard/clipboard_mac.mm', |
| 81 'base/clipboard/clipboard_util_win.cc', |
| 82 'base/clipboard/clipboard_util_win.h', |
| 83 'base/clipboard/clipboard_win.cc', |
| 84 'base/clipboard/scoped_clipboard_writer.cc', |
| 85 'base/clipboard/scoped_clipboard_writer.h', |
| 86 'base/dragdrop/drag_drop_types_gtk.cc', |
| 87 'base/dragdrop/drag_drop_types.h', |
| 88 'base/dragdrop/drag_drop_types_win.cc', |
| 89 'base/dragdrop/drag_source.cc', |
| 90 'base/dragdrop/drag_source.h', |
| 91 'base/dragdrop/drop_target.cc', |
| 92 'base/dragdrop/drop_target.h', |
| 93 'base/dragdrop/gtk_dnd_util.cc', |
| 94 'base/dragdrop/gtk_dnd_util.h', |
| 95 'base/dragdrop/os_exchange_data.cc', |
| 96 'base/dragdrop/os_exchange_data.h', |
| 97 'base/dragdrop/os_exchange_data_provider_gtk.cc', |
| 98 'base/dragdrop/os_exchange_data_provider_gtk.h', |
| 99 'base/dragdrop/os_exchange_data_provider_win.cc', |
| 100 'base/dragdrop/os_exchange_data_provider_win.h', |
| 101 'base/events.h', |
| 102 'base/gtk/event_synthesis_gtk.cc', |
| 103 'base/gtk/event_synthesis_gtk.h', |
| 104 'base/gtk/g_object_destructor_filo.cc', |
| 105 'base/gtk/g_object_destructor_filo.h', |
| 106 'base/gtk/gtk_im_context_util.cc', |
| 107 'base/gtk/gtk_im_context_util.h', |
| 108 'base/gtk/gtk_signal.h', |
| 109 'base/gtk/gtk_signal_registrar.cc', |
| 110 'base/gtk/gtk_signal_registrar.h', |
| 111 'base/gtk/gtk_windowing.cc', |
| 112 'base/gtk/gtk_windowing.h', |
| 113 'base/ime/composition_text.cc', |
| 114 'base/ime/composition_text.h', |
| 115 'base/ime/composition_underline.h', |
| 116 'base/ime/text_input_type.h', |
| 117 'base/keycodes/keyboard_code_conversion_gtk.cc', |
| 118 'base/keycodes/keyboard_code_conversion_gtk.h', |
| 119 'base/keycodes/keyboard_code_conversion_mac.h', |
| 120 'base/keycodes/keyboard_code_conversion_mac.mm', |
| 121 'base/keycodes/keyboard_code_conversion_win.cc', |
| 122 'base/keycodes/keyboard_code_conversion_win.h', |
| 123 'base/keycodes/keyboard_code_conversion_x.cc', |
| 124 'base/keycodes/keyboard_code_conversion_x.h', |
| 125 'base/keycodes/keyboard_codes.h', |
| 126 'base/l10n/l10n_font_util.cc', |
| 127 'base/l10n/l10n_font_util.h', |
| 128 'base/l10n/l10n_util.cc', |
| 129 'base/l10n/l10n_util.h', |
| 130 'base/l10n/l10n_util_collator.h', |
| 131 'base/l10n/l10n_util_mac.h', |
| 132 'base/l10n/l10n_util_mac.mm', |
| 133 'base/l10n/l10n_util_posix.cc', |
| 134 'base/l10n/l10n_util_win.cc', |
| 135 'base/l10n/l10n_util_win.h', |
| 136 'base/message_box_flags.h', |
| 137 'base/message_box_win.cc', |
| 138 'base/message_box_win.h', |
| 139 'base/models/accelerator_cocoa.h', |
| 140 'base/models/accelerator_cocoa.mm', |
| 141 'base/models/accelerator_gtk.h', |
| 142 'base/models/accelerator.h', |
| 143 'base/models/button_menu_item_model.cc', |
| 144 'base/models/button_menu_item_model.h', |
| 145 'base/models/combobox_model.h', |
| 146 'base/models/menu_model.cc', |
| 147 'base/models/menu_model.h', |
| 148 'base/models/menu_model_delegate.h', |
| 149 'base/models/simple_menu_model.cc', |
| 150 'base/models/simple_menu_model.h', |
| 151 'base/models/table_model.cc', |
| 152 'base/models/table_model.h', |
| 153 'base/models/table_model_observer.h', |
| 154 'base/models/tree_model.cc', |
| 155 'base/models/tree_model.h', |
| 156 'base/models/tree_node_iterator.h', |
| 157 'base/models/tree_node_model.h', |
| 158 'base/range/range.cc', |
| 159 'base/range/range.h', |
| 160 'base/range/range_mac.mm', |
| 161 'base/range/range_win.cc', |
| 162 'base/resource/data_pack.cc', |
| 163 'base/resource/data_pack.h', |
| 164 'base/resource/resource_bundle.cc', |
| 165 'base/resource/resource_bundle.h', |
| 166 'base/resource/resource_bundle_linux.cc', |
| 167 'base/resource/resource_bundle_mac.mm', |
| 168 'base/resource/resource_bundle_posix.cc', |
| 169 'base/resource/resource_bundle_win.cc', |
| 170 'base/text/bytes_formatting.cc', |
| 171 'base/text/bytes_formatting.h', |
| 172 'base/text/text_elider.cc', |
| 173 'base/text/text_elider.h', |
| 174 'base/theme_provider.cc', |
| 175 'base/theme_provider.h', |
| 176 'base/ui_base_paths.cc', |
| 177 'base/ui_base_paths.h', |
| 178 'base/ui_base_switches.cc', |
| 179 'base/ui_base_switches.h', |
| 180 'base/view_prop.cc', |
| 181 'base/view_prop.h', |
| 182 'base/win/hwnd_util.cc', |
| 183 'base/win/hwnd_util.h', |
| 184 'base/win/ime_input.cc', |
| 185 'base/win/ime_input.h', |
| 186 'base/win/shell.cc', |
| 187 'base/win/shell.h', |
| 188 'base/win/window_impl.cc', |
| 189 'base/win/window_impl.h', |
| 190 'base/x/active_window_watcher_x.cc', |
| 191 'base/x/active_window_watcher_x.h', |
| 192 'base/x/x11_util.cc', |
| 193 'base/x/x11_util.h', |
| 194 'base/x/x11_util_internal.h', |
| 195 'gfx/blit.cc', |
| 196 'gfx/blit.h', |
| 197 'gfx/brush.h', |
| 198 'gfx/canvas.cc', |
| 199 'gfx/canvas.h', |
| 200 'gfx/canvas_skia.h', |
| 201 'gfx/canvas_skia.cc', |
| 202 'gfx/canvas_skia_linux.cc', |
| 203 'gfx/canvas_skia_mac.mm', |
| 204 'gfx/canvas_skia_paint.h', |
| 205 'gfx/canvas_skia_win.cc', |
| 206 'gfx/codec/jpeg_codec.cc', |
| 207 'gfx/codec/jpeg_codec.h', |
| 208 'gfx/codec/png_codec.cc', |
| 209 'gfx/codec/png_codec.h', |
| 210 'gfx/color_analysis.cc', |
| 211 'gfx/color_analysis.h', |
| 212 'gfx/color_utils.cc', |
| 213 'gfx/color_utils.h', |
| 214 'gfx/favicon_size.h', |
| 215 'gfx/font.h', |
| 216 'gfx/font.cc', |
| 217 'gfx/gfx_paths.cc', |
| 218 'gfx/gfx_paths.h', |
| 219 'gfx/image/image.cc', |
| 220 'gfx/image/image.h', |
| 221 'gfx/image/image_mac.mm', |
| 222 'gfx/image/image_util.cc', |
| 223 'gfx/image/image_util.h', |
| 224 'gfx/insets.cc', |
| 225 'gfx/insets.h', |
| 226 'gfx/interpolated_transform.h', |
| 227 'gfx/interpolated_transform.cc', |
| 228 'gfx/mac/nsimage_cache.h', |
| 229 'gfx/mac/nsimage_cache.mm', |
| 230 'gfx/mac/scoped_ns_disable_screen_updates.h', |
| 231 'gfx/native_theme.cc', |
| 232 'gfx/native_theme.h', |
| 233 'gfx/native_widget_types.h', |
| 234 'gfx/path.cc', |
| 235 'gfx/path.h', |
| 236 'gfx/path_gtk.cc', |
| 237 'gfx/path_win.cc', |
| 238 'gfx/platform_font.h', |
| 239 'gfx/platform_font_gtk.h', |
| 240 'gfx/platform_font_gtk.cc', |
| 241 'gfx/platform_font_mac.h', |
| 242 'gfx/platform_font_mac.mm', |
| 243 'gfx/platform_font_win.h', |
| 244 'gfx/platform_font_win.cc', |
| 245 'gfx/point.cc', |
| 246 'gfx/point.h', |
| 247 'gfx/rect.cc', |
| 248 'gfx/rect.h', |
| 249 'gfx/scoped_cg_context_save_gstate_mac.h', |
| 250 'gfx/scoped_ns_graphics_context_save_gstate_mac.h', |
| 251 'gfx/scoped_ns_graphics_context_save_gstate_mac.mm', |
| 252 'gfx/scrollbar_size.cc', |
| 253 'gfx/scrollbar_size.h', |
| 254 'gfx/size.cc', |
| 255 'gfx/size.h', |
| 256 'gfx/skbitmap_operations.cc', |
| 257 'gfx/skbitmap_operations.h', |
| 258 'gfx/skia_util.cc', |
| 259 'gfx/skia_util.h', |
| 260 'gfx/skia_utils_gtk.cc', |
| 261 'gfx/skia_utils_gtk.h', |
| 262 'gfx/transform.h', |
| 263 'gfx/transform.cc', |
| 264 ], |
| 265 'conditions': [ |
| 266 ['toolkit_uses_gtk == 1', { |
| 267 'dependencies': [ |
| 268 # font_gtk.cc uses fontconfig. |
| 269 # TODO(evanm): I think this is wrong; it should just use GTK. |
| 270 '../build/linux/system.gyp:fontconfig', |
| 271 '../build/linux/system.gyp:gtk', |
| 272 '../build/linux/system.gyp:x11', |
| 273 '../build/linux/system.gyp:xext', |
| 274 ], |
| 275 'sources': [ |
| 276 'gfx/gtk_native_view_id_manager.cc', |
| 277 'gfx/gtk_native_view_id_manager.h', |
| 278 'gfx/gtk_preserve_window.cc', |
| 279 'gfx/gtk_preserve_window.h', |
| 280 'gfx/gtk_util.cc', |
| 281 'gfx/gtk_util.h', |
| 282 'gfx/native_theme_linux.cc', |
| 283 'gfx/native_theme_linux.h', |
| 284 'gfx/native_widget_types_gtk.cc', |
| 285 ], |
| 286 'link_settings': { |
| 287 'libraries': [ |
| 288 '-lXrender', # For XRender* function calls in x11_util.cc. |
| 289 ], |
| 290 }, |
| 291 'conditions': [ |
| 292 ['toolkit_views==0', { |
| 293 # Note: because of gyp predence rules this has to be defined as |
| 294 # 'sources/' rather than 'sources!'. |
| 295 'sources/': [ |
| 296 ['exclude', '^base/dragdrop/drag_drop_types_gtk.cc'], |
| 297 ['exclude', '^base/dragdrop/os_exchange_data.cc'], |
| 298 ['exclude', '^base/dragdrop/os_exchange_data.h'], |
| 299 ['exclude', '^base/dragdrop/os_exchange_data_provider_gtk.cc'], |
| 300 ['exclude', '^base/dragdrop/os_exchange_data_provider_gtk.h'], |
| 301 ], |
| 302 }, { |
| 303 # Note: because of gyp predence rules this has to be defined as |
| 304 # 'sources/' rather than 'sources!'. |
| 305 'sources/': [ |
| 306 ['include', '^base/dragdrop/os_exchange_data.cc'], |
| 307 ], |
| 308 }], |
| 309 ], |
| 310 }], |
| 311 ['OS=="win"', { |
| 312 'sources': [ |
| 313 'gfx/canvas_direct2d.cc', |
| 314 'gfx/canvas_direct2d.h', |
| 315 'gfx/gdi_util.cc', |
| 316 'gfx/gdi_util.h', |
| 317 'gfx/icon_util.cc', |
| 318 'gfx/icon_util.h', |
| 319 'gfx/native_theme_win.cc', |
| 320 'gfx/native_theme_win.h', |
| 321 'gfx/win_util.cc', |
| 322 'gfx/win_util.h', |
| 323 ], |
| 324 'include_dirs': [ |
| 325 '../', |
| 326 '../third_party/wtl/include', |
| 327 ], |
| 328 'msvs_settings': { |
| 329 'VCLinkerTool': { |
| 330 'DelayLoadDLLs': [ |
| 331 'd2d1.dll', |
| 332 'd3d10_1.dll', |
| 333 ], |
| 334 'AdditionalDependencies': [ |
| 335 'd2d1.lib', |
| 336 'd3d10_1.lib', |
| 337 ], |
| 338 }, |
| 339 }, |
| 340 'link_settings': { |
| 341 'libraries': [ |
| 342 '-limm32.lib', |
| 343 '-loleacc.lib', |
| 344 ], |
| 345 }, |
| 346 },{ # OS!="win" |
| 347 'sources!': [ |
| 348 'base/dragdrop/drag_source.cc', |
| 349 'base/dragdrop/drag_source.h', |
| 350 'base/dragdrop/drag_drop_types.h', |
| 351 'base/dragdrop/drop_target.cc', |
| 352 'base/dragdrop/drop_target.h', |
| 353 'base/dragdrop/os_exchange_data.cc', |
| 354 'base/view_prop.cc', |
| 355 'base/view_prop.h', |
| 356 ], |
| 357 'sources/': [ |
| 358 ['exclude', '^base/win/*'], |
| 359 ], |
| 360 }], |
| 361 ['component == "shared_library"', { |
| 362 'defines': [ |
| 363 'UI_IMPLEMENTATION', |
| 364 ], |
| 365 }], |
| 366 ['OS=="mac"', { |
| 367 'link_settings': { |
| 368 'libraries': [ |
| 369 '$(SDKROOT)/System/Library/Frameworks/Accelerate.framework', |
| 370 '$(SDKROOT)/System/Library/Frameworks/AudioUnit.framework', |
| 371 ], |
| 372 }, |
| 373 }], |
| 374 ['use_x11==1', { |
| 375 'all_dependent_settings': { |
| 376 'ldflags': [ |
| 377 '-L<(PRODUCT_DIR)', |
| 378 ], |
| 379 'link_settings': { |
| 380 'libraries': [ |
| 381 '-lX11', |
| 382 '-ldl', |
| 383 ], |
| 384 }, |
| 385 }, |
| 386 }, { # use_x11==0 |
| 387 'sources!': [ |
| 388 'base/keycodes/keyboard_code_conversion_x.cc', |
| 389 'base/keycodes/keyboard_code_conversion_x.h', |
| 390 ], |
| 391 }], |
| 392 ['chromeos==1', { |
| 393 'sources': [ |
| 394 'gfx/native_theme_chromeos.cc', |
| 395 'gfx/native_theme_chromeos.h', |
| 396 ], |
| 397 }], |
| 398 ], |
| 399 }, |
| 400 { |
| 401 'target_name': 'gfx_resources', |
| 402 'type': 'none', |
| 403 'variables': { |
| 404 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/gfx', |
| 405 }, |
| 406 'actions': [ |
| 407 { |
| 408 'action_name': 'gfx_resources', |
| 409 'variables': { |
| 410 'grit_grd_file': 'gfx/gfx_resources.grd', |
| 411 }, |
| 412 'includes': [ '../build/grit_action.gypi' ], |
| 413 }, |
| 414 ], |
| 415 'includes': [ '../build/grit_target.gypi' ], |
| 416 }, |
| 417 ], |
32 'conditions': [ | 418 'conditions': [ |
33 ['toolkit_views2==1', { | 419 ['toolkit_views2==1', { |
34 'includes': [ | 420 'includes': [ |
35 'ui_views.gypi', | 421 'ui_views.gypi', |
36 ], | 422 ], |
37 }], | 423 }], |
38 ['inside_chromium_build==1', { | 424 ['inside_chromium_build==1', { |
39 'includes': [ | 425 'includes': [ |
40 'ui_unittests.gypi', | 426 'ui_unittests.gypi', |
41 ], | 427 ], |
| 428 'targets': [ |
| 429 { |
| 430 # TODO(rsesek): Remove this target once ui_unittests is run on the |
| 431 # waterfall instead of gfx_unittests. |
| 432 'target_name': 'gfx_unittests', |
| 433 'type': 'none', |
| 434 'dependencies': [ |
| 435 'ui_unittests', |
| 436 ], |
| 437 'actions': [ |
| 438 { |
| 439 'message': 'TEMPORARY: Copying ui_unittests to gfx_unittests', |
| 440 'variables': { |
| 441 'ui_copy_target': '<(PRODUCT_DIR)/ui_unittests<(EXECUTABLE_SUFFI
X)', |
| 442 'ui_copy_dest': '<(PRODUCT_DIR)/gfx_unittests<(EXECUTABLE_SUFFIX
)', |
| 443 }, |
| 444 'inputs': ['<(ui_copy_target)'], |
| 445 'outputs': ['<(ui_copy_dest)'], |
| 446 'action_name': 'TEMP_copy_ui_unittests', |
| 447 'action': [ |
| 448 'python', '-c', |
| 449 'import os, shutil; ' \ |
| 450 'shutil.copyfile(\'<(ui_copy_target)\', \'<(ui_copy_dest)\'); '
\ |
| 451 'os.chmod(\'<(ui_copy_dest)\', 0700)' |
| 452 ] |
| 453 } |
| 454 ], |
| 455 }, |
| 456 ], |
| 457 }], |
| 458 ['OS=="win"', { |
| 459 'targets': [ |
| 460 { |
| 461 'target_name': 'ui_nacl_win64', |
| 462 'type': '<(component)', |
| 463 'dependencies': [ |
| 464 '../base/base.gyp:base_nacl_win64', |
| 465 ], |
| 466 'defines': [ |
| 467 '<@(nacl_win64_defines)', |
| 468 ], |
| 469 'sources': [ |
| 470 'base/resource/resource_bundle_dummy.cc', |
| 471 'base/ui_base_paths.h', |
| 472 'base/ui_base_paths.cc', |
| 473 'base/ui_base_switches.h', |
| 474 'base/ui_base_switches.cc', |
| 475 ], |
| 476 'include_dirs': [ |
| 477 '..', |
| 478 ], |
| 479 'configurations': { |
| 480 'Common_Base': { |
| 481 'msvs_target_platform': 'x64', |
| 482 }, |
| 483 }, |
| 484 'conditions': [ |
| 485 ['component=="shared_library"', { |
| 486 'defines': [ |
| 487 'UI_IMPLEMENTATION', |
| 488 ], |
| 489 }], |
| 490 ], |
| 491 }, |
| 492 ], |
42 }], | 493 }], |
43 ], | 494 ], |
44 } | 495 } |
OLD | NEW |