1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 14:07:45 +00:00

Meta: Add gn build for the MacPDF application

This commit is contained in:
Andrew Kaster 2023-10-20 10:21:11 -06:00 committed by Andrew Kaster
parent 967ccd2be8
commit 4522c82459
3 changed files with 147 additions and 0 deletions

View file

@ -0,0 +1,37 @@
#
# This file introduces a template for compiling Apple platform interface
# builder files.
#
# The output files will be placed in $target_gen_dir with the source name
# suffix-replaced from "Foo.xib" to "Foo.nib"
#
# Example use:
#
# compile_xib_resources("my_nibs") {
# sources = [
# "A.xib",
# "B.xib",
# ]
# }
#
template("compile_xib_resources") {
action_foreach(target_name) {
forward_variables_from(invoker, [ "sources" ])
script = "//Meta/gn/build/invoke_process_with_args.py"
outputs = [ "$target_gen_dir/{{source_name_part}}.nib" ]
args = [
"ibtool",
"--errors",
"--warnings",
"--notices",
"--output-format",
"human-readable-text",
"--compile",
rebase_path(target_gen_dir, root_build_dir) + "/{{source_name_part}}.nib",
"{{source}}",
]
}
}