OLD | NEW |
| (Empty) |
1 # Copyright 2015 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("//cc/cc.gni") | |
6 import("//third_party/protobuf/proto_library.gni") | |
7 | |
8 # Use a group here to allow external targets to depend on "cc/proto" instead of | |
9 # cc/proto:cc_proto. We need a group because other component targets are named | |
10 # "proto" which breaks component builds. A group doesn't have the same issue. | |
11 group("proto") { | |
12 public_deps = [ | |
13 ":cc_proto", | |
14 ] | |
15 } | |
16 | |
17 cc_component("cc_proto") { | |
18 # Only expose the target to the "proto" group. | |
19 visibility = [ ":proto" ] | |
20 | |
21 public_deps = [ | |
22 ":proto_internal", | |
23 ] | |
24 } | |
25 | |
26 proto_library("proto_internal") { | |
27 # Only expose the target to the "cc_proto" target. | |
28 visibility = [ ":cc_proto" ] | |
29 | |
30 sources = [ | |
31 # TODO(dtrainor): Move protos to their correct packages once it's possible | |
32 # to include protos from other directories/targets (crbug.com/542423). | |
33 "client_state_update.proto", | |
34 "compositor_message.proto", | |
35 "display_item.proto", | |
36 "layer.proto", | |
37 "layer_position_constraint.proto", | |
38 "layer_selection_bound.proto", | |
39 "layer_sticky_position_constraint.proto", | |
40 "layer_tree.proto", | |
41 "layer_tree_host.proto", | |
42 "point.proto", | |
43 "point3f.proto", | |
44 "pointf.proto", | |
45 "rect.proto", | |
46 "rectf.proto", | |
47 "region.proto", | |
48 "scroll_offset.proto", | |
49 "size.proto", | |
50 "sizef.proto", | |
51 "skclipop.proto", | |
52 "skregion.proto", | |
53 "skrrect.proto", | |
54 "skxfermode.proto", | |
55 "transform.proto", | |
56 "vector2d.proto", | |
57 "vector2df.proto", | |
58 ] | |
59 | |
60 deps = [ | |
61 "//third_party/protobuf:protobuf_lite", | |
62 ] | |
63 | |
64 cc_generator_options = "dllexport_decl=CC_PROTO_EXPORT:" | |
65 cc_include = "cc/proto/cc_proto_export.h" | |
66 component_build_force_source_set = true | |
67 defines = [ "CC_PROTO_IMPLEMENTATION" ] | |
68 | |
69 # Warn if clang creates exit destructors. | |
70 extra_configs = [ "//build/config/compiler:wexit_time_destructors" ] | |
71 } | |
OLD | NEW |