Apply _RELATIVE relocations ahead of others.
[chromium-blink-merge.git] / components / metrics.gypi
blobbd25e211f3b240869905aedf4b5f969f6db134a4
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.
6   'targets': [
7     {
8       # GN version: //components/metrics
9       'target_name': 'metrics',
10       'type': 'static_library',
11       'include_dirs': [
12         '..',
13       ],
14       'dependencies': [
15         '../base/base.gyp:base',
16         '../third_party/zlib/zlib.gyp:zlib',
17         'component_metrics_proto',
18         'variations',
19       ],
20       'export_dependent_settings': [
21         'component_metrics_proto',
22       ],
23       'sources': [
24         'metrics/clean_exit_beacon.cc',
25         'metrics/clean_exit_beacon.h',
26         'metrics/client_info.cc',
27         'metrics/client_info.h',
28         'metrics/cloned_install_detector.cc',
29         'metrics/cloned_install_detector.h',
30         'metrics/compression_utils.cc',
31         'metrics/compression_utils.h',
32         'metrics/daily_event.cc',
33         'metrics/daily_event.h',
34         'metrics/machine_id_provider.h',
35         'metrics/machine_id_provider_stub.cc',
36         'metrics/machine_id_provider_win.cc',
37         'metrics/metrics_hashes.cc',
38         'metrics/metrics_hashes.h',
39         'metrics/metrics_log.cc',
40         'metrics/metrics_log.h',
41         'metrics/metrics_log_manager.cc',
42         'metrics/metrics_log_manager.h',
43         'metrics/metrics_log_uploader.cc',
44         'metrics/metrics_log_uploader.h',
45         'metrics/metrics_pref_names.cc',
46         'metrics/metrics_pref_names.h',
47         'metrics/metrics_provider.cc',
48         'metrics/metrics_provider.h',
49         'metrics/metrics_reporting_scheduler.cc',
50         'metrics/metrics_reporting_scheduler.h',
51         'metrics/metrics_service.cc',
52         'metrics/metrics_service.h',
53         'metrics/metrics_service_client.cc',
54         'metrics/metrics_service_client.h',
55         'metrics/metrics_state_manager.cc',
56         'metrics/metrics_state_manager.h',
57         'metrics/metrics_switches.cc',
58         'metrics/metrics_switches.h',
59         'metrics/persisted_logs.cc',
60         'metrics/persisted_logs.h',
61       ],
62       'conditions': [
63         ['chromeos==1', {
64           'dependencies': [
65             'metrics_serialization',
66           ],
67         }],
68         ['OS=="win"', {
69           'sources!': [
70             'metrics/machine_id_provider_stub.cc',
71           ],
72         }],
73       ],
74     },
75     {
76       # GN version: //components/metrics:gpu
77       'target_name': 'metrics_gpu',
78       'type': 'static_library',
79       'include_dirs': [
80         '..',
81       ],
82       'dependencies': [
83         'component_metrics_proto',
84         'metrics',
85       ],
86       'sources': [
87         'metrics/gpu/gpu_metrics_provider.cc',
88         'metrics/gpu/gpu_metrics_provider.h',
89       ],
90     },
91     {
92       # GN version: //components/metrics:net
93       'target_name': 'metrics_net',
94       'type': 'static_library',
95       'include_dirs': [
96         '..',
97       ],
98       'dependencies': [
99         '../net/net.gyp:net',
100         'component_metrics_proto',
101         'metrics',
102       ],
103       'sources': [
104         'metrics/net/network_metrics_provider.cc',
105         'metrics/net/network_metrics_provider.h',
106         'metrics/net/net_metrics_log_uploader.cc',
107         'metrics/net/net_metrics_log_uploader.h',
108         'metrics/net/wifi_access_point_info_provider.cc',
109         'metrics/net/wifi_access_point_info_provider.h',
110         'metrics/net/wifi_access_point_info_provider_chromeos.cc',
111         'metrics/net/wifi_access_point_info_provider_chromeos.h',
112       ],
113     },
114     {
115       # GN version: //components/metrics:profiler
116       'target_name': 'metrics_profiler',
117       'type': 'static_library',
118       'include_dirs': [
119         '..',
120       ],
121       'dependencies': [
122         '../content/content.gyp:content_browser',
123         'component_metrics_proto',
124         'metrics',
125       ],
126       'export_dependent_settings': [
127         'component_metrics_proto',
128       ],
129       'sources': [
130         'metrics/profiler/profiler_metrics_provider.cc',
131         'metrics/profiler/profiler_metrics_provider.h',
132         'metrics/profiler/tracking_synchronizer.cc',
133         'metrics/profiler/tracking_synchronizer.h',
134         'metrics/profiler/tracking_synchronizer_observer.h',
135       ],
136     },
137     {
138       # Protobuf compiler / generator for UMA (User Metrics Analysis).
139       #
140       # GN version: //components/metrics/proto:proto
141       'target_name': 'component_metrics_proto',
142       'type': 'static_library',
143       'sources': [
144         'metrics/proto/chrome_user_metrics_extension.proto',
145         'metrics/proto/histogram_event.proto',
146         'metrics/proto/omnibox_event.proto',
147         'metrics/proto/omnibox_input_type.proto',
148         'metrics/proto/perf_data.proto',
149         'metrics/proto/profiler_event.proto',
150         'metrics/proto/sampled_profile.proto',
151         'metrics/proto/system_profile.proto',
152         'metrics/proto/user_action_event.proto',
153       ],
154       'variables': {
155         'proto_in_dir': 'metrics/proto',
156         'proto_out_dir': 'components/metrics/proto',
157       },
158       'includes': [ '../build/protoc.gypi' ],
159     },
160     {
161       # TODO(isherman): Remove all //chrome dependencies on this target, and
162       # merge the files in this target with components_unittests.
163       # GN version: //components/metrics:test_support
164       'target_name': 'metrics_test_support',
165       'type': 'static_library',
166       'include_dirs': [
167         '..',
168       ],
169       'dependencies': [
170         'component_metrics_proto',
171         'metrics',
172       ],
173       'export_dependent_settings': [
174         'component_metrics_proto',
175       ],
176       'sources': [
177         'metrics/test_metrics_service_client.cc',
178         'metrics/test_metrics_service_client.h',
179       ],
180     },
181   ],
182   'conditions': [
183     ['OS=="linux"', {
184       'targets': [
185         {
186           'target_name': 'metrics_serialization',
187           'type': 'static_library',
188           'sources': [
189             'metrics/serialization/serialization_utils.cc',
190             'metrics/serialization/serialization_utils.h',
191             'metrics/serialization/metric_sample.cc',
192             'metrics/serialization/metric_sample.h',
193           ],
194           'dependencies': [
195             '../base/base.gyp:base',
196           ],
197         },
198       ],
199     }],
200   ],