| # Copyright 2018 The ChromiumOS Authors | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| template("genxml2cpp") { | |
| forward_variables_from(invoker, | |
| [ | |
| "xml2cpp_type", | |
| "xml2cpp_out_dir", | |
| ]) | |
| h_dir = "${root_gen_dir}/${xml2cpp_out_dir}" | |
| action_foreach(target_name) { | |
| sources = invoker.sources | |
| script = "//common-mk/file_generator_wrapper.py" | |
| outputs = [ "${h_dir}/{{source_name_part}}.h" ] | |
| args = [ | |
| "dbusxx-xml2cpp", | |
| "{{source}}", | |
| "--${xml2cpp_type}=${h_dir}/{{source_name_part}}.h", | |
| "--sync", | |
| "--async", | |
| ] | |
| } | |
| } |