Convert cr-settings-main to Polymer 0.8
[chromium-blink-merge.git] / remoting / webapp / BUILD.gn
blob02b666779d18c22bc9a6b0423b71168a360619b9
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.
5 # Keep in sync with targets in remoting/remoting_client.gypi.
7 import("//build/config/features.gni")
8 import("//remoting/webapp/build_template.gni")
10 group("webapp") {
11   deps = [
12     ":webapp_v1",
13   ]
15   if (enable_nacl) {
16     deps += [ ":webapp_v2" ]
17   }
20 remoting_webapp("webapp_v1") {
21   webapp_type = "v1"
22   output_dir = "remoting.webapp"
23   zip_path = "remoting-webapp.zip"
24   extra_files = []
27 remoting_webapp("webapp_v2") {
28   webapp_type = "v2_pnacl"
29   output_dir = "remoting.webapp.v2"
30   zip_path = "remoting-webapp.v2.zip"
31   extra_files = [
32     "crd/remoting_client_pnacl.nmf.jinja2",
33     # TODO(garykac): Get correct path to this.
34     #"<(PRODUCT_DIR)/remoting_client_plugin_newlib.pexe",
35   ]
38 group("html") {
39   deps = [
40     ":background_html",
41     ":main_html",
42     ":message_window_html",
43     ":wcs_sandbox_html",
44   ]
47 action("main_html") {
48   script = "build-html.py"
50   inputs = [ remoting_webapp_template_main ] + remoting_webapp_template_files +
51            remoting_webapp_crd_main_html_all_js_files
53   outputs = [
54     "$target_gen_dir/main.html",
55   ]
57   args = [
58     rebase_path("$target_gen_dir/main.html", root_build_dir),
59     rebase_path(remoting_webapp_template_main, root_build_dir),
60   ]
61   args += [
62     "--template-dir",
63     rebase_path(remoting_dir, root_build_dir),
64   ]
65   args += [ "--templates" ] +
66           rebase_path(remoting_webapp_template_files, remoting_dir)
67   args += [ "--js" ] +
68           rebase_path(remoting_webapp_crd_main_html_all_js_files, remoting_dir)
71 action("wcs_sandbox_html") {
72   script = "build-html.py"
74   inputs = [ remoting_webapp_template_wcs_sandbox ] +
75            remoting_webapp_wcs_sandbox_html_all_js_files
77   outputs = [
78     "$target_gen_dir/wcs_sandbox.html",
79   ]
81   args = [
82     rebase_path("$target_gen_dir/wcs_sandbox.html", root_build_dir),
83     rebase_path(remoting_webapp_template_wcs_sandbox, root_build_dir),
84   ]
85   args +=
86       [ "--js" ] +
87       rebase_path(remoting_webapp_wcs_sandbox_html_all_js_files, remoting_dir)
90 action("background_html") {
91   script = "build-html.py"
93   inputs = [ remoting_webapp_template_background ] +
94            remoting_webapp_background_html_all_js_files
96   outputs = [
97     "$target_gen_dir/background.html",
98   ]
100   args = [
101     rebase_path("$target_gen_dir/background.html", root_build_dir),
102     rebase_path(remoting_webapp_template_background, root_build_dir),
103   ]
104   args += [ "--js" ] + rebase_path(remoting_webapp_background_html_all_js_files,
105                                    remoting_dir)
108 action("message_window_html") {
109   script = "build-html.py"
111   inputs = [ remoting_webapp_template_message_window ] +
112            remoting_webapp_message_window_html_all_js_files
114   outputs = [
115     "$target_gen_dir/message_window.html",
116   ]
118   args = [
119     rebase_path("$target_gen_dir/message_window.html", root_build_dir),
120     rebase_path(remoting_webapp_template_message_window, root_build_dir),
121   ]
122   args +=
123       [ "--js" ] + rebase_path(remoting_webapp_message_window_html_all_js_files,
124                                remoting_dir)