Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Add godot-sandbox as a module.
Browse files Browse the repository at this point in the history
  • Loading branch information
fire committed Nov 3, 2024
1 parent 44dd36d commit 73decd8
Show file tree
Hide file tree
Showing 60 changed files with 160 additions and 0 deletions.
44 changes: 44 additions & 0 deletions godot/modules/sandbox/SCsub
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/usr/bin/env python
from misc.utility.scons_hints import *

Import("env")
Import("env_modules")

def get_sufix():
suffix = ".{}.{}".format(env["platform"], env["target"])
# In godot it's "linuxbsd"
suffix = suffix.replace("linuxbsd", "linux")
# Only take release
suffix = suffix.replace("editor", "template_release")
suffix = suffix.replace("template_debug", "template_release")
if env.dev_build:
suffix += ".dev"
if env["precision"] == "double":
suffix += ".double"
suffix += "." + env["arch"]
if not env["threads"]:
suffix += ".nothreads"
return suffix.replace("editor", "template_release")

# Libraries
if env["platform"] == "macos" or env["platform"] == "ios":
base_path = "#modules/sandbox/bin/addons/godot_sandbox/bin/libgodot_riscv{}.framework".format(get_sufix())
base_file = "libgodot_riscv{}".format(get_sufix())
else:
base_path = "#modules/sandbox/bin/addons/godot_sandbox/bin"
base_file = "libgodot_riscv{}".format(get_sufix())

env.Append(LIBS=[base_file])
env.Append(LIBPATH=[base_path])

# Godot-cpp
base_path = "#modules/sandbox/ext/godot-cpp/bin"
base_file = "libgodot-cpp{}".format(get_sufix())

env.Append(LIBS=[base_file])
env.Append(LIBPATH=[base_path])

# Sources
env_gdextension = env_modules.Clone()

env_gdextension.add_source_files(env.modules_sources, "*.cpp")
Loading

0 comments on commit 73decd8

Please sign in to comment.