Skip to content

Commit

Permalink
Add setup_args and run meson setup explictly (#1223)
Browse files Browse the repository at this point in the history
Co-authored-by: James Sharpe <james.sharpe@zenotech.com>
  • Loading branch information
allsey87 and jsharpe authored Aug 8, 2024
1 parent d58cdf6 commit af66969
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion foreign_cc/meson.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,13 @@ def _create_meson_script(configureParameters):

prefix = "{} ".format(expand_locations_and_make_variables(ctx, attrs.tool_prefix, "tool_prefix", data)) if attrs.tool_prefix else ""

script.append("{prefix}{meson} --prefix={install_dir} {options} {source_dir}".format(
setup_args_str = " ".join(expand_locations_and_make_variables(ctx, ctx.attr.setup_args, "setup_args", data))

script.append("{prefix}{meson} setup --prefix={install_dir} {setup_args} {options} {source_dir}".format(
prefix = prefix,
meson = attrs.meson_path,
install_dir = "$$INSTALLDIR$$",
setup_args = setup_args_str,
options = options_str,
source_dir = "$$EXT_BUILD_ROOT$$/" + root,
))
Expand Down Expand Up @@ -171,6 +174,10 @@ def _attrs():
mandatory = False,
default = {},
),
"setup_args": attr.string_list(
doc = "Arguments for the Meson setup command",
mandatory = False,
),
})
return attrs

Expand Down

0 comments on commit af66969

Please sign in to comment.