Skip to content

Commit 80d2626

Browse files
authored
feat: add PRODUCT_DIR_ABS variable (#151)
1 parent c11f805 commit 80d2626

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

pylib/gyp/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,18 @@ def Load(
103103
for (key, val) in generator.generator_default_variables.items():
104104
default_variables.setdefault(key, val)
105105

106+
output_dir = params["options"].generator_output or params["options"].toplevel_dir
107+
if default_variables["GENERATOR"] == "ninja":
108+
default_variables.setdefault(
109+
"PRODUCT_DIR_ABS",
110+
os.path.join(output_dir, "out", default_variables["build_type"]),
111+
)
112+
else:
113+
default_variables.setdefault(
114+
"PRODUCT_DIR_ABS",
115+
os.path.join(output_dir, default_variables["CONFIGURATION_NAME"]),
116+
)
117+
106118
# Give the generator the opportunity to set additional variables based on
107119
# the params it will receive in the output phase.
108120
if getattr(generator, "CalculateVariables", None):

0 commit comments

Comments
 (0)