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

Side by Side Diff: mojo/public/c/BUILD.gn

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 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 | « mojo/public/build/config/BUILD.gn ('k') | mojo/public/c/PRESUBMIT.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2016 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.
4
5 import("../mojo_sdk.gni")
6
7 config("c_config") {
8 include_dirs = [ "include" ]
9 }
10
11 # Catch-all for all public C headers/libraries, except for the bindings.
12 group("c") {
13 public_deps = [
14 ":common",
15 ":system",
16 ]
17 }
18
19 # bindings ---------------------------------------------------------------------
20
21 # Headers in include/mojo/bindings (to be included as <mojo/bindings/HEADER.h>)
22 # and library in lib/bindings.
23 #
24 # Depends on :common and :system (minimally -- just <mojo/system/handle.h>).
25
26 mojo_sdk_source_set("bindings") {
27 public_configs = [ ":c_config" ]
28
29 sources = [
30 # Public headers.
31 "include/mojo/bindings/array.h",
32 "include/mojo/bindings/buffer.h",
33 "include/mojo/bindings/interface.h",
34 "include/mojo/bindings/map.h",
35 "include/mojo/bindings/message.h",
36 "include/mojo/bindings/string.h",
37 "include/mojo/bindings/struct.h",
38 "include/mojo/bindings/union.h",
39 "include/mojo/bindings/validation.h",
40
41 # Internal headers.
42 "include/mojo/bindings/internal/type_descriptor.h",
43 "include/mojo/bindings/internal/util.h",
44
45 # Implementation library.
46 # TODO(vtl): Maybe separate this out into a separate source set (or even
47 # static library?).
48 "lib/bindings/array.c",
49 "lib/bindings/buffer.c",
50 "lib/bindings/map.c",
51 "lib/bindings/message.c",
52 "lib/bindings/struct.c",
53 "lib/bindings/type_descriptor.c",
54 "lib/bindings/union.c",
55 ]
56
57 deps = [
58 ":system",
59 ]
60 }
61
62 mojo_sdk_source_set("bindings_unittests") {
63 testonly = true
64
65 sources = [
66 "tests/bindings/array_unittest.cc",
67 "tests/bindings/buffer_unittest.cc",
68 "tests/bindings/message_unittest.cc",
69 "tests/bindings/struct_unittest.cc",
70 "tests/bindings/testing_util.h",
71 "tests/bindings/union_unittest.cc",
72 "tests/bindings/validation_unittest.cc",
73 ]
74
75 deps = [
76 ":bindings",
77 ]
78
79 mojo_sdk_deps = [
80 "mojo/public:gtest",
81 "mojo/public/cpp/bindings/tests:mojo_public_bindings_test_utils",
82 "mojo/public/cpp/bindings/tests:validation_util",
83 "mojo/public/cpp/test_support",
84 "mojo/public/cpp/system",
85
86 # The "_c" suffix'd target compiles the generated C bindings to this mojom
87 # target.
88 "mojo/public/interfaces/bindings/tests:test_interfaces_c",
89 ]
90 }
91
92 # common -----------------------------------------------------------------------
93
94 # Headers in include/mojo (to be included as <mojo/HEADER.h>).
95 #
96 # Depends on nothing.
97
98 mojo_sdk_source_set("common") {
99 public_configs = [ ":c_config" ]
100
101 sources = [
102 "include/mojo/macros.h",
103 "include/mojo/result.h",
104 ]
105 }
106
107 mojo_sdk_source_set("common_unittests") {
108 testonly = true
109
110 sources = [
111 "tests/macros_unittest.cc",
112 "tests/result_unittest.cc",
113 ]
114
115 deps = [
116 ":common",
117 ]
118
119 mojo_sdk_deps = [ "mojo/public:gtest" ]
120 }
121
122 # environment ------------------------------------------------------------------
123
124 # Headers in include/mojo/environment (to be included as
125 # <mojo//environment/HEADER.h>).
126 #
127 # Depends on :system (and thus :common).
128
129 mojo_sdk_source_set("environment") {
130 public_configs = [ ":c_config" ]
131
132 sources = [
133 "include/mojo/environment/async_waiter.h",
134 "include/mojo/environment/logger.h",
135 ]
136
137 public_deps = [
138 ":system",
139 ]
140 }
141
142 mojo_sdk_source_set("environment_perftest_helpers") {
143 testonly = true
144
145 sources = [
146 "tests/environment/async_waiter_perftest_helpers.cc",
147 "tests/environment/async_waiter_perftest_helpers.h",
148 ]
149
150 public_deps = [
151 ":environment",
152 ]
153
154 mojo_sdk_deps = [ "mojo/public/cpp/system" ]
155 }
156
157 # gpu / gpu_onscreen -----------------------------------------------------------
158
159 # TODO(vtl): Rationalize this to be more like the others. Probably, we should
160 # just have :GLES2, :MGL, etc. targets (and no :gpu/:gpu_onscreen).
161
162 group("gpu") {
163 public_deps = [
164 ":GLES2",
165 ":MGL",
166 ":MGL_signal_sync_point",
167 ]
168
169 deps = [
170 "../platform/native:gles2_thunks",
171 ]
172 if (!is_nacl) {
173 deps += [ "../platform/native:mgl_thunks" ]
174 }
175 }
176
177 group("gpu_onscreen") {
178 public_deps = [
179 ":MGL_onscreen",
180 ":gpu",
181 ]
182
183 if (!is_nacl) {
184 deps = [
185 "../platform/native:mgl_onscreen_thunks",
186 ]
187 }
188 }
189
190 mojo_sdk_source_set("MGL") {
191 public_configs = [ ":c_config" ]
192
193 sources = [
194 "include/MGL/mgl.h",
195 "include/MGL/mgl_types.h",
196 ]
197
198 public_deps = [
199 ":system",
200 ]
201 }
202
203 mojo_sdk_source_set("MGL_onscreen") {
204 public_configs = [ ":c_config" ]
205
206 sources = [
207 "include/MGL/mgl_onscreen.h",
208 ]
209
210 public_deps = [
211 ":MGL",
212 ]
213 }
214
215 mojo_sdk_source_set("MGL_echo") {
216 public_configs = [ ":c_config" ]
217
218 sources = [
219 "include/MGL/mgl_echo.h",
220 ]
221
222 public_deps = [
223 ":MGL",
224 ]
225 }
226
227 mojo_sdk_source_set("MGL_signal_sync_point") {
228 public_configs = [ ":c_config" ]
229
230 sources = [
231 "include/MGL/mgl_signal_sync_point.h",
232 ]
233
234 public_deps = [
235 ":MGL",
236 ]
237 }
238
239 mojo_sdk_source_set("GLES2") {
240 public_configs = [ ":c_config" ]
241
242 sources = [
243 "include/GLES2/gl2.h",
244 "include/GLES2/gl2ext.h",
245 "include/GLES2/gl2extmojo.h",
246 "include/GLES2/gl2mojo_autogen.h",
247 "include/GLES2/gl2mojo_internal.h",
248 "include/GLES2/gl2platform.h",
249 ]
250
251 public_deps = [
252 ":KHR",
253 ]
254 }
255
256 mojo_sdk_source_set("KHR") {
257 public_configs = [ ":c_config" ]
258
259 sources = [
260 "include/KHR/khrplatform.h",
261 ]
262 }
263
264 # system -----------------------------------------------------------------------
265
266 # Headers in include/mojo/system (to be included as <mojo/system/HEADER.h>).
267 #
268 # Depends on :common.
269
270 mojo_sdk_source_set("system") {
271 public_configs = [ ":c_config" ]
272
273 sources = [
274 "include/mojo/system/buffer.h",
275 "include/mojo/system/data_pipe.h",
276 "include/mojo/system/handle.h",
277 "include/mojo/system/main.h",
278 "include/mojo/system/message_pipe.h",
279 "include/mojo/system/time.h",
280 "include/mojo/system/wait.h",
281 "include/mojo/system/wait_set.h",
282 ]
283
284 public_deps = [
285 ":common",
286 ]
287 }
288
289 mojo_sdk_source_set("system_unittests") {
290 testonly = true
291
292 sources = [
293 "tests/system/buffer_unittest.cc",
294 "tests/system/data_pipe_unittest.cc",
295 "tests/system/handle_unittest.cc",
296 "tests/system/message_pipe_unittest.cc",
297 "tests/system/time_unittest.cc",
298 "tests/system/wait_set_unittest.cc",
299 "tests/system/wait_unittest.cc",
300 ]
301
302 deps = [
303 ":system",
304 ]
305
306 mojo_sdk_deps = [ "mojo/public:gtest" ]
307 }
308
309 mojo_sdk_source_set("system_perftests") {
310 testonly = true
311
312 sources = [
313 "tests/system/message_pipe_perftest.cc",
314 "tests/system/perftest_utils.cc",
315 "tests/system/perftest_utils.h",
316 "tests/system/reference_perftest.cc",
317 "tests/system/wait_set_perftest.cc",
318 ]
319
320 deps = [
321 ":system",
322 ]
323
324 mojo_sdk_deps = [
325 "mojo/public:gtest",
326 "mojo/public/cpp/test_support",
327 ]
328 }
329
330 # Compilation tests ------------------------------------------------------------
331
332 # This test ensures that various headers compile and link properly.
333 mojo_sdk_source_set("compile_unittests") {
334 testonly = true
335
336 sources = [
337 "tests/compile/compile_unittest.cc",
338 ]
339
340 deps = [
341 ":pure_compile_tests",
342 ]
343
344 mojo_sdk_deps = [ "mojo/public:gtest" ]
345 }
346
347 # This source set contains "pure" tests that only depend on the public SDK (and
348 # the standard library), and in particular not on gtest (whose headers don't
349 # compile with "-Wundef").
350 mojo_sdk_source_set("pure_compile_tests") {
351 testonly = true
352
353 visibility = [ ":compile_unittests" ]
354
355 cflags = [ "-Wundef" ]
356
357 sources = [
358 "tests/compile/pure_c.c",
359 "tests/compile/pure_cpp.cc",
360 ]
361
362 mojo_sdk_deps = [ "mojo/public/c:environment" ]
363 }
OLDNEW
« no previous file with comments | « mojo/public/build/config/BUILD.gn ('k') | mojo/public/c/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698