forked from robin-raymond/zsLib-eventing
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathzslib_eventing_tool.gni
103 lines (76 loc) · 2.62 KB
/
zslib_eventing_tool.gni
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#import("//build/compiled_action.gni")
import("//third_party/idl/tool_build.gni")
template("compile_event_macro") {
action_foreach(target_name) {
script = "//third_party/idl/zsLib-eventing/runEventCompiler.py"
sources = invoker.sources
#Not of interest. Added just because outputs is required by action
outputs = [
"$target_out_dir/{{source_name_part}}",
]
args = [
"{{source}}",
"$current_cpu",
"$host_cpu",
]
deps = [ "//third_party/idl/zsLib-eventing:zslib-eventing-tool-compiler($tool_build_toolchain)" ]
}
}
template("compile_single_event_macro") {
action(target_name) {
script = "//third_party/idl/zsLib-eventing/runEventCompiler.py"
sources = invoker.sources
idlAlreadyCompletedFlag = invoker.idlAlreadyCompletedFlag
if (defined(invoker.idlOutputPath)) {
idlOutputPath = invoker.idlOutputPath
} else {
idlOutputPath = "."
}
#Not of interest. Added just because outputs is required by action
outputs = [
"$target_out_dir/{source_name_part}",
]
args = [
rebase_path(sources[0], root_build_dir),
idlAlreadyCompletedFlag,
"$current_cpu",
"$idlOutputPath",
"$host_cpu",
]
deps = [ "//third_party/idl/zsLib-eventing:zslib-eventing-tool-compiler($tool_build_toolchain)" ]
}
}
template("compile_idl_macro") {
action(target_name) {
script = "//third_party/idl/zsLib-eventing/runIDLCompiler.py"
sources = invoker.sources
idlAlreadyCompletedFlag = invoker.idlAlreadyCompletedFlag
if (defined(invoker.idlOutputPath)) {
idlOutputPath = invoker.idlOutputPath
} else {
idlOutputPath = "."
}
if (defined(invoker.idlLanguages)) {
idlLanguages = invoker.idlLanguages
} else {
idlLanguages = "c dotnet json cx json wrapper python cppwinrt msidl"
}
#Not of interest. Added just because outputs is required by action
outputs = [
"$target_out_dir/$target_name/{source_name_part}",
]
#outputs = invoker.outputs
args = [
rebase_path(sources[0], root_build_dir),
idlAlreadyCompletedFlag,
"$current_cpu",
"$idlOutputPath",
"$idlLanguages",
"$host_cpu",
]
deps = [ "//third_party/idl/zsLib-eventing:zslib-eventing-tool-compiler($tool_build_toolchain)" ]
}
}