Clarify and update GN build flags docs.
[chromium-blink-merge.git] / components / data_reduction_proxy.gypi
blob4742760eedd62bb411130bbc2708c7d1000775e3
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.
7   'variables' :
8   {
9      'data_reduction_proxy_core_browser_sources' : [
10         # Note: sources list duplicated in GN build.
11         "data_reduction_proxy/core/browser/data_reduction_proxy_debug_ui_service.h",
12         'data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol.cc',
13         'data_reduction_proxy/core/browser/data_reduction_proxy_bypass_protocol.h',
14         'data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.cc',
15         'data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.h',
16         'data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.cc',
17         'data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h',
18         'data_reduction_proxy/core/browser/data_reduction_proxy_config.cc',
19         'data_reduction_proxy/core/browser/data_reduction_proxy_config.h',
20         'data_reduction_proxy/core/browser/data_reduction_proxy_config_retrieval_params.cc',
21         'data_reduction_proxy/core/browser/data_reduction_proxy_config_retrieval_params.h',
22         'data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.cc',
23         'data_reduction_proxy/core/browser/data_reduction_proxy_config_service_client.h',
24         'data_reduction_proxy/core/browser/data_reduction_proxy_configurator.cc',
25         'data_reduction_proxy/core/browser/data_reduction_proxy_configurator.h',
26         'data_reduction_proxy/core/browser/data_reduction_proxy_delegate.cc',
27         'data_reduction_proxy/core/browser/data_reduction_proxy_delegate.h',
28         'data_reduction_proxy/core/browser/data_reduction_proxy_experiments_stats.cc',
29         'data_reduction_proxy/core/browser/data_reduction_proxy_experiments_stats.h',
30         'data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.cc',
31         'data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.h',
32         'data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc',
33         'data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h',
34         'data_reduction_proxy/core/browser/data_reduction_proxy_metrics.cc',
35         'data_reduction_proxy/core/browser/data_reduction_proxy_metrics.h',
36         'data_reduction_proxy/core/browser/data_reduction_proxy_mutable_config_values.cc',
37         'data_reduction_proxy/core/browser/data_reduction_proxy_mutable_config_values.h',
38         'data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.cc',
39         'data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h',
40         'data_reduction_proxy/core/browser/data_reduction_proxy_prefs.cc',
41         'data_reduction_proxy/core/browser/data_reduction_proxy_prefs.h',
42         'data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc',
43         'data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h',
44         'data_reduction_proxy/core/browser/data_reduction_proxy_service.cc',
45         'data_reduction_proxy/core/browser/data_reduction_proxy_service.h',
46         'data_reduction_proxy/core/browser/data_reduction_proxy_service_observer.h',
47         'data_reduction_proxy/core/browser/data_reduction_proxy_settings.cc',
48         'data_reduction_proxy/core/browser/data_reduction_proxy_settings.h',
49         'data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection.cc',
50         'data_reduction_proxy/core/browser/data_reduction_proxy_tamper_detection.h',
51      ],
52      'data_reduction_proxy_core_browser_deps' : [
53         'data_reduction_proxy_version_header',
54         '../base/base.gyp:base',
55         '../crypto/crypto.gyp:crypto',
56         'pref_registry',
57      ],
58      'data_reduction_proxy_core_common_sources' : [
59         # Note: sources list duplicated in GN build.
60         'data_reduction_proxy/core/common/data_reduction_proxy_bypass_action_list.h',
61         'data_reduction_proxy/core/common/data_reduction_proxy_bypass_type_list.h',
62         'data_reduction_proxy/core/common/data_reduction_proxy_client_config_parser.cc',
63         'data_reduction_proxy/core/common/data_reduction_proxy_client_config_parser.h',
64         'data_reduction_proxy/core/common/data_reduction_proxy_config_values.h',
65         'data_reduction_proxy/core/common/data_reduction_proxy_event_creator.cc',
66         'data_reduction_proxy/core/common/data_reduction_proxy_event_creator.h',
67         'data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate.h',
68         'data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc',
69         'data_reduction_proxy/core/common/data_reduction_proxy_event_store.h',
70         'data_reduction_proxy/core/common/data_reduction_proxy_headers.cc',
71         'data_reduction_proxy/core/common/data_reduction_proxy_headers.h',
72         'data_reduction_proxy/core/common/data_reduction_proxy_params.cc',
73         'data_reduction_proxy/core/common/data_reduction_proxy_params.h',
74         'data_reduction_proxy/core/common/data_reduction_proxy_pref_names.cc',
75         'data_reduction_proxy/core/common/data_reduction_proxy_pref_names.h',
76         'data_reduction_proxy/core/common/data_reduction_proxy_switches.cc',
77         'data_reduction_proxy/core/common/data_reduction_proxy_switches.h',
78      ],
79   },
80   'conditions': [
81     # Small versions of libraries for Cronet.
82     ['OS=="android"', {
83       'targets' : [
84        {
85          # GN version: //components/data_reduction_proxy/core/browser
86          'target_name': 'data_reduction_proxy_core_browser_small',
87          'type': 'static_library',
88          'dependencies': [
89            '<@(data_reduction_proxy_core_browser_deps)',
90            '../net/net.gyp:net_small',
91            '../url/url.gyp:url_lib_use_icu_alternatives_on_android',
92            'data_reduction_proxy_core_common_small',
93            'data_reduction_proxy_proto',
94          ],
95          'include_dirs': [
96            '..',
97          ],
98          'sources': [
99            '<@(data_reduction_proxy_core_browser_sources)'
100          ],
101        },
102        {
103          # GN version: //components/data_reduction_proxy/core/common
104          'target_name': 'data_reduction_proxy_core_common_small',
105          'type': 'static_library',
106          'dependencies': [
107            '../base/base.gyp:base',
108            '../url/url.gyp:url_lib_use_icu_alternatives_on_android',
109            'data_reduction_proxy_proto',
110          ],
111          'include_dirs': [
112            '..',
113          ],
114          'sources': [
115            '<@(data_reduction_proxy_core_common_sources)'
116          ],
117        },
118     ]}]
119   ],
120   'targets': [
121    {
122       # GN Version: //components/data_reduction_proxy/content
123       'target_name': 'data_reduction_proxy_content',
124       'type': 'static_library',
125       'dependencies': [
126         '../base/base.gyp:base',
127         '../content/content.gyp:content_browser',
128         '../skia/skia.gyp:skia',
129         '../ui/base/ui_base.gyp:ui_base',
130         'components_resources.gyp:components_resources',
131         'components_strings.gyp:components_strings',
132       ],
133       'include_dirs': [
134         '..',
135       ],
136       'sources': [
137         # Note: sources list duplicated in GN build.
138         'data_reduction_proxy/content/browser/content_data_reduction_proxy_debug_ui_service.cc',
139         'data_reduction_proxy/content/browser/content_data_reduction_proxy_debug_ui_service.h',
140         'data_reduction_proxy/content/browser/data_reduction_proxy_debug_blocking_page.cc',
141         'data_reduction_proxy/content/browser/data_reduction_proxy_debug_blocking_page.h',
142         'data_reduction_proxy/content/browser/data_reduction_proxy_debug_resource_throttle.cc',
143         'data_reduction_proxy/content/browser/data_reduction_proxy_debug_resource_throttle.h',
144         'data_reduction_proxy/content/browser/data_reduction_proxy_debug_ui_manager.cc',
145         'data_reduction_proxy/content/browser/data_reduction_proxy_debug_ui_manager.h',
146       ],
147     },
148     {
149       # GN version: //components/data_reduction_proxy/content/common
150       'target_name': 'data_reduction_proxy_content_common',
151       'type': 'static_library',
152       'dependencies': [
153         '../content/content.gyp:content_common',
154         '../ipc/ipc.gyp:ipc',
155       ],
156       'include_dirs': [
157         '..',
158       ],
159       'sources': [
160         'data_reduction_proxy/content/common/data_reduction_proxy_messages.cc',
161         'data_reduction_proxy/content/common/data_reduction_proxy_messages.h',
162       ],
163     },
164     {
165       # GN version: //components/data_reduction_proxy/content/browser
166       'target_name': 'data_reduction_proxy_content_browser',
167       'type': 'static_library',
168       'dependencies': [
169         '../content/content.gyp:content_common',
170         '../ipc/ipc.gyp:ipc',
171         'data_reduction_proxy_content_common',
172       ],
173       'include_dirs': [
174         '..',
175       ],
176       'sources': [
177         'data_reduction_proxy/content/browser/data_reduction_proxy_message_filter.cc',
178         'data_reduction_proxy/content/browser/data_reduction_proxy_message_filter.h',
179       ],
180     },
181     {
182       # GN version: //components/data_reduction_proxy/core/browser
183       'target_name': 'data_reduction_proxy_core_browser',
184       'type': 'static_library',
185       'conditions': [
186         ['OS != "android" and OS != "ios"', {
187           'dependencies' : [
188             '../google_apis/google_apis.gyp:google_apis',
189           ]
190         }],
191       ],
192       'dependencies': [
193         '<@(data_reduction_proxy_core_browser_deps)',
194         '../net/net.gyp:net',
195         '../url/url.gyp:url_lib',
196         'data_reduction_proxy_core_common',
197         'data_reduction_proxy_proto',
198       ],
199       'include_dirs': [
200         '..',
201       ],
202       'sources': [
203         '<@(data_reduction_proxy_core_browser_sources)'
204       ],
205     },
206     {
207       # GN version: //components/data_reduction_proxy/core/common
208       'target_name': 'data_reduction_proxy_core_common',
209       'type': 'static_library',
210       'dependencies': [
211         '../base/base.gyp:base',
212         '../url/url.gyp:url_lib',
213         'data_reduction_proxy_proto',
214       ],
215       'include_dirs': [
216         '..',
217       ],
218       'sources': [
219         '<@(data_reduction_proxy_core_common_sources)'
220       ],
221     },
222     {
223       # GN version: //components/data_reduction_proxy/core/browser:test_support
224       'target_name': 'data_reduction_proxy_test_support',
225       'type': 'static_library',
226       'dependencies' : [
227         '../base/base.gyp:base',
228         '../net/net.gyp:net',
229         '../net/net.gyp:net_test_support',
230         '../testing/gmock.gyp:gmock',
231         '../testing/gtest.gyp:gtest',
232         'data_reduction_proxy_content',
233         'data_reduction_proxy_core_browser',
234         'data_reduction_proxy_core_common',
235       ],
236       'include_dirs': [
237         '..',
238       ],
239       'sources': [
240         # Note: sources list duplicated in GN build.
241         'data_reduction_proxy/core/browser/data_reduction_proxy_config_test_utils.cc',
242         'data_reduction_proxy/core/browser/data_reduction_proxy_config_test_utils.h',
243         'data_reduction_proxy/core/browser/data_reduction_proxy_configurator_test_utils.cc',
244         'data_reduction_proxy/core/browser/data_reduction_proxy_configurator_test_utils.h',
245         'data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.cc',
246         'data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.h',
247         'data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.cc',
248         'data_reduction_proxy/core/browser/data_reduction_proxy_test_utils.h',
249         'data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate_test_utils.cc',
250         'data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate_test_utils.h',
251         'data_reduction_proxy/core/common/data_reduction_proxy_headers_test_utils.cc',
252         'data_reduction_proxy/core/common/data_reduction_proxy_headers_test_utils.h',
253         'data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.cc',
254         'data_reduction_proxy/core/common/data_reduction_proxy_params_test_utils.h',
255       ],
256       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
257       'msvs_disabled_warnings': [4267, ],
258     },
259     {
260       # GN version: //components/data_reduction_proxy/proto
261       'target_name': 'data_reduction_proxy_proto',
262       'type': 'static_library',
263       'dependencies': [
264       ],
265       'include_dirs': [
266       ],
267       'sources': [
268         # Note: sources list duplicated in GN build.
269         'data_reduction_proxy/proto/client_config.proto',
270       ],
271       'variables': {
272         'proto_in_dir': 'data_reduction_proxy/proto',
273         'proto_out_dir': 'components/data_reduction_proxy/proto',
274       },
275       'includes': [ '../build/protoc.gypi' ],
276     },
277     {
278       'target_name': 'data_reduction_proxy_version_header',
279       'type': 'none',
280       'direct_dependent_settings': {
281         'include_dirs': [
282           '<(SHARED_INTERMEDIATE_DIR)',
283         ],
284       },
285       'actions': [
286         {
287           'action_name': 'version_header',
288           'message': 'Generating version header file: <@(_outputs)',
289           'inputs': [
290             '<(version_path)',
291             'data_reduction_proxy/core/common/version.h.in',
292           ],
293           'outputs': [
294             '<(SHARED_INTERMEDIATE_DIR)/components/data_reduction_proxy/core/common/version.h',
295           ],
296           'action': [
297             'python',
298             '<(version_py_path)',
299             '-e', 'VERSION_FULL="<(version_full)"',
300             'data_reduction_proxy/core/common/version.h.in',
301             '<@(_outputs)',
302           ],
303           'includes': [
304             '../build/util/version.gypi',
305           ],
306         },
307       ],
308     },
309   ],