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.
4
5{
6  'targets': [
7    {
8      # GN version: //remoting/client/plugin
9      'target_name': 'remoting_client_plugin',
10      'type': 'static_library',
11      'variables': { 'enable_wexit_time_destructors': 1, },
12      'defines': [
13        'HAVE_STDINT_H',  # Required by on2_integer.h
14      ],
15      'dependencies': [
16        '../net/net.gyp:net',
17        '../ppapi/ppapi.gyp:ppapi_cpp_objects',
18        '../ppapi/ppapi.gyp:ppapi_internal_module',
19        '../third_party/webrtc/modules/modules.gyp:desktop_capture',
20        '../ui/events/events.gyp:dom4_keycode_converter',
21        'remoting_base',
22        'remoting_client',
23        'remoting_protocol',
24      ],
25      'sources': [
26        '<@(remoting_client_plugin_sources)',
27        'client/plugin/pepper_entrypoints.cc',
28        'client/plugin/pepper_entrypoints.h',
29      ],
30    },  # end of target 'remoting_client_plugin'
31
32    {
33      # GN version: //remoting/client
34      'target_name': 'remoting_client',
35      'type': 'static_library',
36      'variables': { 'enable_wexit_time_destructors': 1, },
37      'defines': [
38        'VERSION=<(version_full)',
39      ],
40      'dependencies': [
41        'remoting_base',
42        'remoting_protocol',
43        '../third_party/libyuv/libyuv.gyp:libyuv',
44        '../third_party/webrtc/modules/modules.gyp:desktop_capture',
45        '../third_party/libwebm/libwebm.gyp:libwebm',
46      ],
47      'sources': [
48        '<@(remoting_client_sources)',
49      ],
50    },  # end of target 'remoting_client'
51
52    {
53      'target_name': 'remoting_webapp_html',
54      'type': 'none',
55      'actions': [
56        {
57          # GN version: //remoting/webapp:html
58          'action_name': 'Build Remoting Webapp main.html',
59          'inputs': [
60            'webapp/build-html.py',
61            '<(remoting_webapp_template_main)',
62            '<@(remoting_webapp_template_files)',
63          ],
64          'outputs': [
65            '<(SHARED_INTERMEDIATE_DIR)/main.html',
66          ],
67          'action': [
68            'python', 'webapp/build-html.py',
69            '<(SHARED_INTERMEDIATE_DIR)/main.html',
70            '<(remoting_webapp_template_main)',
71            '--template', '<@(remoting_webapp_template_files)',
72            '--js', '<@(remoting_webapp_main_html_js_files)',
73          ],
74        },
75        {
76          'action_name': 'Build Remoting Webapp wcs_sandbox.html',
77          'inputs': [
78            'webapp/build-html.py',
79            '<(remoting_webapp_template_wcs_sandbox)',
80          ],
81          'outputs': [
82            '<(SHARED_INTERMEDIATE_DIR)/wcs_sandbox.html',
83          ],
84          'action': [
85            'python', 'webapp/build-html.py',
86            '<(SHARED_INTERMEDIATE_DIR)/wcs_sandbox.html',
87            '<(remoting_webapp_template_wcs_sandbox)',
88            '--js', '<@(remoting_webapp_wcs_sandbox_html_js_files)',
89          ],
90        },
91        {
92          'action_name': 'Build Remoting Webapp background.html',
93          'inputs': [
94            'webapp/build-html.py',
95            '<(remoting_webapp_template_background)',
96          ],
97          'outputs': [
98            '<(SHARED_INTERMEDIATE_DIR)/background.html',
99          ],
100          'action': [
101            'python', 'webapp/build-html.py',
102            '<(SHARED_INTERMEDIATE_DIR)/background.html',
103            '<(remoting_webapp_template_background)',
104            '--js', '<@(remoting_webapp_background_js_files)',
105          ],
106        },
107      ],
108    },  # end of target 'remoting_webapp_html'
109
110    {
111      'target_name': 'remoting_webapp',
112      'type': 'none',
113      'dependencies': [
114        'remoting_webapp_v1',
115        'remoting_webapp_v2',
116      ],
117    },  # end of target 'remoting_webapp'
118
119    {
120      'target_name': 'remoting_webapp_v1',
121      'type': 'none',
122      'variables': {
123        'webapp_type': 'v1',
124        'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp',
125        'zip_path': '<(PRODUCT_DIR)/remoting-webapp.zip',
126      },
127      'includes': [ 'remoting_webapp.gypi', ],
128    },  # end of target 'remoting_webapp_v1'
129
130    {
131      'target_name': 'remoting_webapp_v2',
132      'type': 'none',
133      'variables': {
134        'output_dir': '<(PRODUCT_DIR)/remoting/remoting.webapp.v2',
135        'zip_path': '<(PRODUCT_DIR)/remoting-webapp.v2.zip',
136      },
137      'conditions': [
138        ['disable_nacl==0 and disable_nacl_untrusted==0', {
139          'dependencies': [
140            'remoting_nacl.gyp:remoting_client_plugin_nacl',
141          ],
142          'variables': {
143            'webapp_type': 'v2_pnacl',
144            'extra_files': [
145              'webapp/remoting_client_pnacl.nmf',
146              '<(PRODUCT_DIR)/remoting_client_plugin_newlib.pexe',
147            ],
148          },
149        }, {
150          'variables': {
151            'webapp_type': 'v2',
152          },
153        }],
154      ],
155      'includes': [ 'remoting_webapp.gypi', ],
156    },  # end of target 'remoting_webapp_v2'
157  ],  # end of targets
158}
159