mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-01 05:48:37 +03:00
Merge pull request #1819 from dsnopek/fix-custom-api-file-scons-401
Fix `custom_api_file` with SCons 4.0.1
This commit is contained in:
@@ -258,8 +258,7 @@ def options(opts, env):
|
||||
help="Path to a custom directory containing GDExtension interface header and API JSON file",
|
||||
default=env.get("gdextension_dir", None),
|
||||
validator=validate_dir,
|
||||
),
|
||||
converter=normalize_path,
|
||||
)
|
||||
)
|
||||
opts.Add(
|
||||
PathVariable(
|
||||
@@ -267,8 +266,7 @@ def options(opts, env):
|
||||
help="Path to a custom GDExtension API JSON file (takes precedence over `gdextension_dir`)",
|
||||
default=env.get("custom_api_file", None),
|
||||
validator=validate_file,
|
||||
),
|
||||
converter=normalize_path,
|
||||
)
|
||||
)
|
||||
opts.Add(
|
||||
BoolVariable(
|
||||
@@ -537,8 +535,10 @@ def generate(env):
|
||||
|
||||
|
||||
def _godot_cpp(env):
|
||||
extension_dir = env.get("gdextension_dir", default=env.Dir("gdextension").srcnode().abspath)
|
||||
api_file = env.get("custom_api_file", default=os.path.join(extension_dir, "extension_api.json"))
|
||||
extension_dir = normalize_path(env.get("gdextension_dir", default=env.Dir("gdextension").srcnode().abspath), env)
|
||||
api_file = normalize_path(
|
||||
env.get("custom_api_file", default=os.path.join(extension_dir, "extension_api.json")), env
|
||||
)
|
||||
|
||||
bindings = env.GodotCPPBindings(
|
||||
env.Dir("."),
|
||||
|
||||
Reference in New Issue
Block a user