Skip to content

Commit

Permalink
feat: add PRODUCT_DIR_ABS variable
Browse files Browse the repository at this point in the history
  • Loading branch information
gengjiawen committed May 11, 2022
1 parent 026fac4 commit 543175f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion pylib/gyp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,18 @@ def Load(
for (key, val) in generator.generator_default_variables.items():
default_variables.setdefault(key, val)

output_dir = params["options"].generator_output or params["options"].toplevel_dir
if default_variables["GENERATOR"] == "ninja":
default_variables.setdefault(
"PRODUCT_DIR_ABS",
os.path.join(output_dir, "out", default_variables["build_type"]),
)
else:
default_variables.setdefault(
"PRODUCT_DIR_ABS",
os.path.join(output_dir, default_variables["CONFIGURATION_NAME"]),
)

# Give the generator the opportunity to set additional variables based on
# the params it will receive in the output phase.
if getattr(generator, "CalculateVariables", None):
Expand Down Expand Up @@ -663,4 +675,4 @@ def script_main():


if __name__ == "__main__":
sys.exit(script_main())
sys.exit(script_main())

0 comments on commit 543175f

Please sign in to comment.