Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / content / browser / devtools / BUILD.gn
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 import("//tools/grit/grit_rule.gni")
6
7 # In GYP: devtools_resources target.
8 group("resources") {
9   deps = [
10     ":devtools_resources",
11     ":devtools_protocol_constants",
12   ]
13 }
14
15 # In GYP: devtools_resources action in the devtools_resources target.
16 grit("devtools_resources") {
17   source = "$root_gen_dir/devtools/devtools_resources.grd"
18
19   output_dir = "$root_gen_dir/webkit"
20   outputs = [
21     "grit/devtools_resources.h",
22     "devtools_resources.pak",
23     "grit/devtools_resources_map.cc",
24     "grit/devtools_resources_map.h",
25   ]
26
27   defines = [
28     "SHARED_INTERMEDIATE_DIR=" + rebase_path(root_gen_dir, root_build_dir),
29   ]
30
31   deps = [
32     # This is the action that generates out .grd input file.
33     "//third_party/WebKit/public:blink_generate_devtools_grd",
34   ]
35 }
36
37 action("gen_devtools_protocol_constants") {
38   visibility = ":devtools_protocol_constants"
39
40   script = "//content/public/browser/devtools_protocol_constants_generator.py"
41
42   blink_protocol = "//third_party/WebKit/Source/devtools/protocol.json"
43   browser_protocol = "browser_protocol.json"
44   inputs = [ blink_protocol, browser_protocol ]
45
46   outputs = [
47     "$target_gen_dir/devtools_protocol_constants.cc",
48     "$target_gen_dir/devtools_protocol_constants.h",
49   ]
50
51   args = [ "content" ] + rebase_path(outputs, root_build_dir) + [
52     rebase_path(blink_protocol, root_build_dir),
53     rebase_path(browser_protocol, root_build_dir),
54   ]
55 }
56
57 source_set("devtools_protocol_constants") {
58   visibility = ":resources"
59   sources = get_target_outputs(":gen_devtools_protocol_constants")
60 }