| # Copyright 2013 The Flutter 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("//flutter/impeller/tools/args.gni") |
| |
| template("scenec") { |
| assert(defined(invoker.geometry), "Geometry input files must be specified.") |
| assert(defined(invoker.type), |
| "The type of geometry to be parsed (gltf, etc..).") |
| |
| compiled_action_foreach(target_name) { |
| tool = "//flutter/impeller/scene/importer:scenec" |
| |
| sources = invoker.geometry |
| input_type = invoker.type |
| |
| args = [ |
| "--input={{source}}", |
| "--input-type=$input_type", |
| ] |
| |
| output = "$target_gen_dir/{{source_file_part}}.ipscene" |
| output_path = rebase_path(output, root_build_dir) |
| |
| args += [ "--output=$output_path" ] |
| |
| outputs = [ output ] |
| } |
| } |