Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ui / views / examples / BUILD.gn
blobb25d3f63062a4a1131452d4d4f54808afee56329
1 # Copyright 2014 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.
5 import("//build/config/ui.gni")
7 component("views_examples_lib") {
8   testonly = true
10   sources = [
11     "bubble_example.cc",
12     "bubble_example.h",
13     "button_example.cc",
14     "button_example.h",
15     "checkbox_example.cc",
16     "checkbox_example.h",
17     "combobox_example.cc",
18     "combobox_example.h",
19     "double_split_view_example.cc",
20     "double_split_view_example.h",
21     "example_base.cc",
22     "example_base.h",
23     "example_combobox_model.cc",
24     "example_combobox_model.h",
25     "examples_window.cc",
26     "examples_window.h",
27     "label_example.cc",
28     "label_example.h",
29     "link_example.cc",
30     "link_example.h",
31     "menu_example.cc",
32     "menu_example.h",
33     "message_box_example.cc",
34     "message_box_example.h",
35     "multiline_example.cc",
36     "multiline_example.h",
37     "progress_bar_example.cc",
38     "progress_bar_example.h",
39     "radio_button_example.cc",
40     "radio_button_example.h",
41     "scroll_view_example.cc",
42     "scroll_view_example.h",
43     "single_split_view_example.cc",
44     "single_split_view_example.h",
45     "slider_example.cc",
46     "slider_example.h",
47     "tabbed_pane_example.cc",
48     "tabbed_pane_example.h",
49     "table_example.cc",
50     "table_example.h",
51     "text_example.cc",
52     "text_example.h",
53     "textfield_example.cc",
54     "textfield_example.h",
55     "throbber_example.cc",
56     "throbber_example.h",
57     "tree_view_example.cc",
58     "tree_view_example.h",
59     "vector_example.cc",
60     "vector_example.h",
61     "views_examples_export.h",
62     "widget_example.cc",
63     "widget_example.h",
64   ]
66   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
67   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
69   defines = [
70     "GFX_VECTOR_ICONS_UNSAFE",
71     "VIEWS_EXAMPLES_IMPLEMENTATION",
72   ]
74   deps = [
75     "//base",
76     "//skia",
77     "//third_party/icu",
78     "//ui/base",
79     "//ui/events",
80     "//ui/gfx",
81     "//ui/gfx/geometry",
82     "//ui/resources",
83     "//ui/resources:ui_test_pak",
84     "//ui/views",
85   ]
87   if (is_win) {
88     deps += [ "//third_party/wtl" ]
89   }
91   if (use_aura) {
92     deps += [ "//ui/aura" ]
93   }
96 executable("views_examples_exe") {
97   testonly = true
99   sources = [
100     "examples_main.cc",
101   ]
103   deps = [
104     ":views_examples_lib",
105     "//base",
106     "//build/config/sanitizers:deps",
107     "//base:i18n",
108     "//ui/base",
109     "//ui/compositor",
110     "//ui/compositor:test_support",
111     "//ui/gfx",
112     "//ui/gl",
113     "//ui/resources:ui_test_pak",
114     "//ui/views",
115     "//ui/views:test_support",
116     "//ui/wm",
117   ]
119   if (use_aura) {
120     deps += [ "//ui/aura" ]
121   }
122   if (use_x11) {
123     deps += [ "//ui/gfx/x" ]
124   }
127 component("views_examples_with_content_lib") {
128   testonly = true
129   sources = [
130     "examples_window_with_content.cc",
131     "examples_window_with_content.h",
132     "views_examples_with_content_export.h",
133     "webview_example.cc",
134     "webview_example.h",
135   ]
137   defines = [ "VIEWS_EXAMPLES_WITH_CONTENT_IMPLEMENTATION" ]
139   deps = [
140     ":views_examples_lib",
141     "//base",
142     "//content",
143     "//skia",
144     "//ui/events",
145     "//ui/views",
146     "//ui/views/controls/webview",
147     "//url",
148   ]
151 executable("views_examples_with_content_exe") {
152   testonly = true
154   sources = [
155     "examples_with_content_main_exe.cc",
156   ]
158   defines = [ "VIEWS_EXAMPLES_WITH_CONTENT_IMPLEMENTATION" ]
160   deps = [
161     ":views_examples_with_content_lib",
162     "//base",
163     "//build/config/sanitizers:deps",
164     "//content",
165     "//content:startup_helper_win",
166     "//ui/views_content_client",
167   ]
169   if (is_win) {
170     configs += [ "//build/config/win:windowed" ]
171     configs -= [ "//build/config/win:console" ]
172   }