compile_qt_resource_file.gni 664 B

123456789101112131415161718192021222324
  1. import("qt_install_prefix.gni")
  2. template("compile_qt_resource_file") {
  3. action_foreach(target_name) {
  4. forward_variables_from(invoker, [ "sources" ])
  5. script = "//Meta/gn/build/invoke_process_with_args.py"
  6. outputs = [ "$target_gen_dir/rcc_{{source_name_part}}.cpp" ]
  7. depfile = "$target_gen_dir/rcc_{{source_name_part}}.cpp.d"
  8. args = [
  9. qt_install_libexec + "rcc",
  10. "-g",
  11. "cpp",
  12. "-d",
  13. rebase_path(target_gen_dir, root_build_dir) +
  14. "/rcc_{{source_name_part}}.cpp.d",
  15. "-o",
  16. rebase_path(target_gen_dir, root_build_dir) +
  17. "/rcc_{{source_name_part}}.cpp",
  18. "{{source}}",
  19. ]
  20. }
  21. }