Implement SingleThreadProxy CommitVSyncParameters
[chromium-blink-merge.git] / remoting / remoting.gyp
blob02b7a66bdd56cc874f2e5eb51693369058351f67
1 # Copyright (c) 2012 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   'variables': {
7     'chromium_code': 1,
9     # Set this to run the jscompile checks after building the webapp.
10     'run_jscompile%': 0,
12     # Set this to enable cast mode on the android client.
13     'enable_cast%': 0,
15     'variables': {
16       'conditions': [
17         # Enable the multi-process host on Windows by default.
18         ['OS=="win"', {
19           'remoting_multi_process%': 1,
20         }, {
21           'remoting_multi_process%': 0,
22         }],
23       ],
24     },
26     'remoting_multi_process%': '<(remoting_multi_process)',
27     'remoting_rdp_session%': 1,
29     'remoting_localize_path': 'tools/build/remoting_localize.py',
31     'branding_path': '../remoting/branding_<(branding)',
33     'webapp_locale_dir': '<(SHARED_INTERMEDIATE_DIR)/remoting/webapp/_locales',
35     'conditions': [
36       ['OS=="mac"', {
37         'mac_bundle_id': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_BUNDLE_ID@")',
38         'mac_creator': '<!(python <(version_py_path) -f <(branding_path) -t "@MAC_CREATOR@")',
39       }],
40       ['OS=="win"', {
41         # Each CLSID is a hash of the current version string salted with an
42         # arbitrary GUID. This ensures that the newly installed COM classes will
43         # be used during/after upgrade even if there are old instances running
44         # already.
45         # The IDs are not random to avoid rebuilding host when it's not
46         # necessary.
47         'daemon_controller_clsid':
48             '<!(python -c "import uuid; print uuid.uuid5(uuid.UUID(\'655bd819-c08c-4b04-80c2-f160739ff6ef\'), \'<(version_full)\')")',
49         'rdp_desktop_session_clsid':
50             '<!(python -c "import uuid; print uuid.uuid5(uuid.UUID(\'6a7699f0-ee43-43e7-aa30-a6738f9bd470\'), \'<(version_full)\')")',
51       }],
52     ],
53     'remoting_locales': [
54       # Note: list duplicated in GN build. See //remoting/resources/BUILD.gn
55       'ar', 'bg', 'ca', 'cs', 'da', 'de', 'el', 'en', 'en-GB', 'es',
56       'es-419', 'et', 'fi', 'fil', 'fr', 'he', 'hi', 'hr', 'hu', 'id',
57       'it', 'ja', 'ko', 'lt', 'lv', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT',
58       'ro', 'ru', 'sk', 'sl', 'sr', 'sv', 'th', 'tr', 'uk', 'vi',
59       'zh-CN', 'zh-TW',
60     ],
61     'remoting_host_locale_files': [
62       # Build the list of .pak files generated from remoting_strings.grd.
63       '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x '
64           '<(PRODUCT_DIR) <(remoting_locales))',
65     ],
66     'remoting_webapp_locale_files': [
67       # Build the list of .json files generated from remoting_strings.grd.
68       '<!@pymod_do_main(remoting_localize --locale_output '
69           '"<(webapp_locale_dir)/@{json_suffix}/messages.json" '
70           '--print_only <(remoting_locales))',
71     ],
72   },
74   'includes': [
75     '../chrome/js_unittest_vars.gypi',
76     'remoting_android.gypi',
77     'remoting_client.gypi',
78     'remoting_host.gypi',
79     'remoting_host_srcs.gypi',
80     'remoting_srcs.gypi',
81     'remoting_test.gypi',
82     'remoting_version.gypi',
83     'remoting_webapp_files.gypi',
84   ],
86   'target_defaults': {
87     'defines': [
88       'BINARY_CORE=1',
89       'BINARY_DESKTOP=2',
90       'BINARY_HOST_ME2ME=3',
91       'BINARY_NATIVE_MESSAGING_HOST=4',
92       'BINARY_REMOTE_ASSISTANCE_HOST=5',
93     ],
94     'include_dirs': [
95       '..',  # Root of Chrome checkout
96     ],
97     'variables': {
98       'win_debug_RuntimeChecks': '0',
99     },
100     'conditions': [
101       ['OS=="mac" and mac_breakpad==1', {
102         'defines': [
103           'REMOTING_ENABLE_BREAKPAD'
104         ],
105       }],
106       ['OS=="win" and buildtype == "Official"', {
107         'defines': [
108           'REMOTING_ENABLE_BREAKPAD'
109         ],
110       }],
111       ['OS=="win" and remoting_multi_process != 0 and \
112           remoting_rdp_session != 0', {
113         'defines': [
114           'REMOTING_RDP_SESSION',
115         ],
116       }],
117       ['remoting_multi_process != 0', {
118         'defines': [
119           'REMOTING_MULTI_PROCESS',
120         ],
121       }],
122     ],
123   },
125   'targets': [
126     {
127       'target_name': 'remoting_breakpad',
128       'type': 'static_library',
129       'variables': { 'enable_wexit_time_destructors': 1, },
130       'dependencies': [
131         '../base/base.gyp:base',
132       ],
133       'sources': [
134         'base/breakpad.h',
135         'base/breakpad_linux.cc',
136         'base/breakpad_mac.mm',
137         'base/breakpad_win.cc',
138       ],
139       'conditions': [
140         ['OS=="mac"', {
141           'dependencies': [
142             '../breakpad/breakpad.gyp:breakpad',
143           ],
144         }],
145         ['OS=="win"', {
146           'dependencies': [
147             '../breakpad/breakpad.gyp:breakpad_handler',
148           ],
149         }],
150       ],
151     },  # end of target 'remoting_breakpad'
153     {
154       # GN version: //remoting/resources
155       'target_name': 'remoting_resources',
156       'type': 'none',
157       'dependencies': [
158         'remoting_webapp_html',
159       ],
160       'variables': {
161         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)',
162         'sources': [
163           '<(SHARED_INTERMEDIATE_DIR)/main.html',
164           'base/resources_unittest.cc',
165           'host/continue_window_mac.mm',
166           'host/disconnect_window_mac.mm',
167           'host/installer/mac/uninstaller/remoting_uninstaller-InfoPlist.strings.jinja2',
168           'host/mac/me2me_preference_pane-InfoPlist.strings.jinja2',
169           'host/win/core.rc.jinja2',
170           'host/win/host_messages.mc.jinja2',
171           'host/win/version.rc.jinja2',
172           'resources/play_store_resources.cc',
173           'webapp/crd/manifest.json.jinja2',
174           '<@(remoting_webapp_crd_js_files)',
175         ],
176       },
177       'actions': [
178         {
179           # GN version: //remoting/resources:verify_resources
180           'action_name': 'verify_resources',
181           'inputs': [
182             'resources/remoting_strings.grd',
183             'tools/verify_resources.py',
184             '<@(sources)'
185           ],
186           'outputs': [
187             '<(PRODUCT_DIR)/remoting_resources_verified.stamp',
188           ],
189           'action': [
190             'python',
191             'tools/verify_resources.py',
192             '-t', '<(PRODUCT_DIR)/remoting_resources_verified.stamp',
193             '-r', 'resources/remoting_strings.grd',
194             '<@(sources)',
195          ],
196         },
197         {
198           # GN version: //remoting/resources:strings
199           'action_name': 'remoting_strings',
200           'variables': {
201             'grit_grd_file': 'resources/remoting_strings.grd',
202           },
203           'includes': [ '../build/grit_action.gypi' ],
204         },
205         {
206           # GN version: //remoting/resources:copy_locales
207           'action_name': 'copy_locales',
208           'variables': {
209             'copy_output_dir%': '<(PRODUCT_DIR)',
210           },
211           'inputs': [
212             'tools/build/remoting_copy_locales.py',
213             '<!@pymod_do_main(remoting_copy_locales -i -p <(OS) -g <(grit_out_dir) <(remoting_locales))'
214           ],
215           'outputs': [
216             '<!@pymod_do_main(remoting_copy_locales -o -p <(OS) -x <(copy_output_dir) <(remoting_locales))'
217           ],
218           'action': [
219             'python', 'tools/build/remoting_copy_locales.py',
220             '-p', '<(OS)',
221             '-g', '<(grit_out_dir)',
222             '-x', '<(copy_output_dir)/.',
223             '<@(remoting_locales)',
224           ],
225         }
226       ],
227       'includes': [ '../build/grit_target.gypi' ],
228     },  # end of target 'remoting_resources'
230     {
231       # GN version: //remoting/base
232       'target_name': 'remoting_base',
233       'type': 'static_library',
234       'variables': { 'enable_wexit_time_destructors': 1, },
235       'dependencies': [
236         '../base/base.gyp:base',
237         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
238         '../media/media.gyp:media',
239         '../media/media.gyp:shared_memory_support',
240         '../net/net.gyp:net',
241         '../third_party/libvpx/libvpx.gyp:libvpx',
242         '../third_party/libyuv/libyuv.gyp:libyuv',
243         '../third_party/opus/opus.gyp:opus',
244         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
245         '../third_party/webrtc/modules/modules.gyp:desktop_capture',
246         '../ui/base/ui_base.gyp:ui_base',
247         '../ui/gfx/gfx.gyp:gfx',
248         '../ui/gfx/gfx.gyp:gfx_geometry',
249         'proto/chromotocol.gyp:chromotocol_proto_lib',
250         'remoting_resources',
251       ],
252       'export_dependent_settings': [
253         '../base/base.gyp:base',
254         '../net/net.gyp:net',
255         '../third_party/protobuf/protobuf.gyp:protobuf_lite',
256         'proto/chromotocol.gyp:chromotocol_proto_lib',
257       ],
258       # This target needs a hard dependency because dependent targets
259       # depend on chromotocol_proto_lib for headers.
260       'hard_dependency': 1,
261       'sources': [
262         '<@(remoting_base_sources)',
263       ],
264     },  # end of target 'remoting_base'
266     {
267       # GN version: //remoting/protocol
268       'target_name': 'remoting_protocol',
269       'type': 'static_library',
270       'variables': { 'enable_wexit_time_destructors': 1, },
271       'dependencies': [
272         '../base/base.gyp:base',
273         '../crypto/crypto.gyp:crypto',
274         '../jingle/jingle.gyp:jingle_glue',
275         '../jingle/jingle.gyp:notifier',
276         '../net/net.gyp:net',
277         '../third_party/libjingle/libjingle.gyp:libjingle',
278         'remoting_base',
279       ],
280       'export_dependent_settings': [
281         '../third_party/libjingle/libjingle.gyp:libjingle',
282       ],
283       'sources': [
284         '<@(remoting_protocol_sources)',
285       ],
286     },  # end of target 'remoting_protocol'
287   ],  # end of targets