Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: sky/engine/core/BUILD.gn

Issue 922893002: Merge the Sky Engine changes from the SkyDart branch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/build/scripts/name_macros.py ('k') | sky/engine/core/animation/Animation.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 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 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 import("//sky/engine/bindings/scripts/scripts.gni")
6 import("//sky/engine/build/scripts/scripts.gni") 5 import("//sky/engine/build/scripts/scripts.gni")
7 import("//sky/engine/core/core.gni") 6 import("//sky/engine/core/core.gni")
8 7
9 visibility = [ "//sky/engine/*" ] 8 visibility = [ "//sky/engine/*" ]
10 9
11 rel_sky_core_gen_dir = rebase_path(sky_core_output_dir, root_build_dir) 10 rel_sky_core_gen_dir = rebase_path(sky_core_output_dir, root_build_dir)
12 11
13 source_set("libraries") { 12 source_set("libraries") {
14 public_deps = [ 13 public_deps = [
15 "//base", 14 "//base",
16 "//gin",
17 "//gpu/command_buffer/client:gles2_c_lib", 15 "//gpu/command_buffer/client:gles2_c_lib",
18 "//mojo/application", 16 "//mojo/application",
19 "//mojo/common", 17 "//mojo/common",
20 "//mojo/edk/js", 18 "//mojo/edk/js",
21 "//mojo/public/c/system", 19 "//mojo/public/c/system",
22 "//mojo/public/cpp/bindings", 20 "//mojo/public/cpp/bindings",
23 "//mojo/public/cpp/system", 21 "//mojo/public/cpp/system",
24 "//mojo/public/cpp/utility", 22 "//mojo/public/cpp/utility",
25 "//mojo/public/interfaces/application", 23 "//mojo/public/interfaces/application",
26 "//mojo/services/keyboard/public/interfaces", 24 "//mojo/services/keyboard/public/interfaces",
27 "//mojo/services/navigation/public/interfaces", 25 "//mojo/services/navigation/public/interfaces",
28 "//mojo/services/view_manager/public/cpp", 26 "//mojo/services/view_manager/public/cpp",
29 "//skia", 27 "//skia",
30 "//sky/engine/tonic:tonic", 28 "//sky/engine/tonic:tonic",
31 "//sky/engine/wtf", 29 "//sky/engine/wtf",
32 "//third_party/angle:translator", 30 "//third_party/angle:translator",
33 "//third_party/iccjpeg", 31 "//third_party/iccjpeg",
34 "//third_party/libpng", 32 "//third_party/libpng",
35 "//third_party/ots", 33 "//third_party/ots",
36 "//third_party/qcms", 34 "//third_party/qcms",
37 "//third_party/zlib", 35 "//third_party/zlib",
38 "//url", 36 "//url",
39 "//v8",
40 ] 37 ]
41 } 38 }
42 39
43 source_set("prerequisites") { 40 source_set("prerequisites") {
44 deps = [ 41 deps = [
45 ":libraries", 42 ":libraries",
46 ":make_core_generated", 43 ":make_core_generated",
47 "//sky/engine/bindings/core/v8:bindings_core_v8_generated",
48 "//sky/engine/platform", 44 "//sky/engine/platform",
49 ] 45 ]
50 46
51 forward_dependent_configs_from = [ ":libraries" ] 47 forward_dependent_configs_from = [ ":libraries" ]
52 48
53 direct_dependent_configs = [ 49 direct_dependent_configs = [
54 "//sky/engine:config", 50 "//sky/engine:config",
55 "//sky/engine:inside_blink", 51 "//sky/engine:inside_blink",
56 "//build/config/compiler:wexit_time_destructors", 52 "//build/config/compiler:wexit_time_destructors",
57 ] 53 ]
58 } 54 }
59 55
60 static_library("core") { 56 static_library("core") {
61 output_name = "sky_core" 57 output_name = "sky_core"
62 58
63 deps = [ 59 deps = [
64 ":core_generated", 60 ":core_generated",
65 ":libraries", 61 ":libraries",
66 ":prerequisites", 62 ":prerequisites",
67 "//sky/engine/platform", 63 "//sky/engine/platform",
64 "//sky/engine/bindings2",
65 "//dart/runtime/bin:libdart_withcore",
68 ] 66 ]
69 67
70 sources = sky_core_files 68 sources = sky_core_files
71 69
72 forward_dependent_configs_from = [ ":libraries" ] 70 forward_dependent_configs_from = [ ":libraries" ]
73 71
74 # core and core_generated are really the same thing. 72 # core and core_generated are really the same thing.
75 allow_circular_includes_from = [ ":core_generated" ] 73 allow_circular_includes_from = [
74 ":core_generated",
75 "//sky/engine/bindings2",
76 ]
76 } 77 }
77 78
78 source_set("testing") { 79 source_set("testing") {
79 deps = [ 80 deps = [
80 ":core", 81 ":core",
81 ":core_generated", 82 ":core_generated",
82 ":prerequisites", 83 ":prerequisites",
83 "//sky/engine/platform", 84 "//sky/engine/platform",
84 "//sky/engine/wtf", 85 "//sky/engine/wtf",
85 ] 86 ]
86 87
87 sources = [ 88 sources = [
88 "testing/DummyPageHolder.cpp", 89 "testing/DummyPageHolder.cpp",
89 "testing/DummyPageHolder.h", 90 "testing/DummyPageHolder.h",
90 "testing/NullExecutionContext.cpp", 91 "testing/NullExecutionContext.cpp",
91 "testing/NullExecutionContext.h", 92 "testing/NullExecutionContext.h",
92 "testing/URLTestHelpers.cpp", 93 "testing/URLTestHelpers.cpp",
93 "testing/URLTestHelpers.h", 94 "testing/URLTestHelpers.h",
94 ] 95 ]
95 } 96 }
96 97
97 source_set("core_generated") { 98 source_set("core_generated") {
98 sources = bindings_core_v8_files 99 sources = [
99
100 # These files include all the .cpp files generated from the .idl files
101 # in webcore_files.
102 sources += bindings_core_generated_aggregate_files
103
104 sources += [
105 # Generated from CSSTokenizer-in.cpp 100 # Generated from CSSTokenizer-in.cpp
106 "$sky_core_output_dir/CSSTokenizer.cpp", 101 "$sky_core_output_dir/CSSTokenizer.cpp",
107 102
108 # Generated from BisonCSSParser-in.cpp 103 # Generated from BisonCSSParser-in.cpp
109 "$sky_core_output_dir/BisonCSSParser.cpp", 104 "$sky_core_output_dir/BisonCSSParser.cpp",
110 105
111 # Additional .cpp files from the make_core_generated rules. 106 # Additional .cpp files from the make_core_generated rules.
112 "$sky_core_output_dir/CSSGrammar.cpp", 107 "$sky_core_output_dir/CSSGrammar.cpp",
113 ] 108 ]
114 109
115 configs += [ "..:inside_blink" ] 110 configs += [ "..:inside_blink" ]
116 111
117 deps = [ 112 deps = [
118 ":make_core_generated", 113 ":make_core_generated",
119 ":prerequisites", 114 ":prerequisites",
120 "//gin",
121 "//skia", 115 "//skia",
122 "//sky/engine/bindings/core/v8:bindings_core_v8_generated",
123 "//sky/engine/platform", 116 "//sky/engine/platform",
124 "//sky/engine/wtf", 117 "//sky/engine/wtf",
125 "//third_party/iccjpeg", 118 "//third_party/iccjpeg",
126 "//third_party/libpng", 119 "//third_party/libpng",
127 "//third_party/qcms", 120 "//third_party/qcms",
128 "//url", 121 "//url",
129 "//v8",
130 ] 122 ]
131 123
132 include_dirs = [ "$root_build_dir" ] 124 include_dirs = [ "$root_build_dir" ]
133 } 125 }
134 126
135 # core_bindings_generated ------------------------------------------------------ 127 # core_event_interfaces --------------------------------------------------------
128
129 # Calls generate_event_interfaces
130 #
131 # Parameters:
132 # sources = A list of IDL files to process.
133 # output_file = The .in file to write, relative to the sky_gen_dir.
134 # suffix = (Optional) String to be passed to script via --suffix
135 template("generate_event_interfaces") {
136 action(target_name) {
137 # Write the file list to a unique temp file to avoid blowing out the
138 # command line length limit.
139 idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp"
140 write_file(idl_files_list, rebase_path(invoker.sources, root_build_dir))
141
142 inputs = [
143 "//sky/engine/bindings2/scripts/utilities.py",
144 idl_files_list,
145 ] + invoker.sources
146
147 output_file = "$root_gen_dir/sky/" + invoker.output_file
148 outputs = [
149 output_file,
150 ]
151
152 script = "//sky/engine/bindings2/scripts/generate_event_interfaces.py"
153 args = [
154 "--event-idl-files-list",
155 rebase_path(idl_files_list, root_build_dir),
156 "--event-interfaces-file",
157 rebase_path(output_file, root_build_dir),
158 "--write-file-only-if-changed=1", # Always true for Ninja.
159 ]
160
161 if (defined(invoker.suffix)) {
162 args += [
163 "--suffix",
164 invoker.suffix,
165 ]
166 }
167 }
168 }
136 169
137 generate_event_interfaces("core_event_interfaces") { 170 generate_event_interfaces("core_event_interfaces") {
138 sources = core_event_idl_files 171 sources = core_event_idl_files
139 output_file = "core/EventInterfaces.in" 172 output_file = "core/EventInterfaces.in"
140 } 173 }
141 174
142 # generated_testing_idls ------------------------------------------------------- 175 # generated_testing_idls -------------------------------------------------------
143 176
144 group("generated_testing_idls") { 177 group("generated_testing_idls") {
145 deps = [ 178 deps = [
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 in_files = [ 326 in_files = [
294 "html/HTMLTagNames.in", 327 "html/HTMLTagNames.in",
295 "html/HTMLAttributeNames.in", 328 "html/HTMLAttributeNames.in",
296 ] 329 ]
297 other_inputs = make_element_factory_files 330 other_inputs = make_element_factory_files
298 outputs = [ 331 outputs = [
299 "$sky_core_output_dir/HTMLElementFactory.cpp", 332 "$sky_core_output_dir/HTMLElementFactory.cpp",
300 "$sky_core_output_dir/HTMLElementFactory.h", 333 "$sky_core_output_dir/HTMLElementFactory.h",
301 "$sky_core_output_dir/HTMLNames.cpp", 334 "$sky_core_output_dir/HTMLNames.cpp",
302 "$sky_core_output_dir/HTMLNames.h", 335 "$sky_core_output_dir/HTMLNames.h",
303 "$sky_core_output_dir/V8HTMLElementWrapperFactory.cpp",
304 "$sky_core_output_dir/V8HTMLElementWrapperFactory.h",
305 ] 336 ]
306 deps = [ 337 deps = [
307 ":libraries", 338 ":libraries",
308 "//sky/engine/bindings/core/v8:bindings_core_v8_generated",
309 ] 339 ]
310 } 340 }
311 341
312 process_in_files("make_core_generated_html_element_type_helpers") { 342 process_in_files("make_core_generated_html_element_type_helpers") {
313 script = "../build/scripts/make_element_type_helpers.py" 343 script = "../build/scripts/make_element_type_helpers.py"
314 344
315 in_files = [ "html/HTMLTagNames.in" ] 345 in_files = [ "html/HTMLTagNames.in" ]
316 other_inputs = make_element_type_helpers_files 346 other_inputs = make_element_type_helpers_files
317 outputs = [ 347 outputs = [
318 "$sky_core_output_dir/HTMLElementTypeHelpers.h", 348 "$sky_core_output_dir/HTMLElementTypeHelpers.h",
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 "$sky_core_output_dir/{{source_name_part}}.h", 488 "$sky_core_output_dir/{{source_name_part}}.h",
459 ] 489 ]
460 args = [ 490 args = [
461 "{{source}}", 491 "{{source}}",
462 rel_sky_core_gen_dir, 492 rel_sky_core_gen_dir,
463 bison_exe, 493 bison_exe,
464 ] 494 ]
465 495
466 deps = make_core_generated_deps 496 deps = make_core_generated_deps
467 } 497 }
OLDNEW
« no previous file with comments | « sky/engine/build/scripts/name_macros.py ('k') | sky/engine/core/animation/Animation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698