Clean up build scripts a bit

This commit is contained in:
2026-03-17 22:25:53 -04:00
parent 863d3a5922
commit 66c74fe25d
3 changed files with 2 additions and 19 deletions

View File

@@ -2,9 +2,6 @@
import os
import sys
import project_config
constant_prefix = project_config.get_defines_friendly_name()
env = SConscript("godot-cpp/SConstruct")
@@ -21,12 +18,11 @@ env.Append(CPPPATH=["src/"])
# Context-specific define for GDExtension
env.Append(CPPDEFINES=["GD_EXTENSION_BUILD"])
env.Append(CPPDEFINES=[f"{constant_prefix}_GDEXTENSION"])
sources = Glob("src/*.cpp")
if env["platform"] == "macos":
library = env.SharedLibrary(
"demo/bin/{}.{}.{}.framework/libgdexample.{}.{}".format(
"demo/bin/{}.{}.{}.framework/{}.{}.{}".format(
project_config.lib_name(),
env["platform"],
env["target"],

3
SCsub
View File

@@ -7,8 +7,7 @@ Import("env")
env.Append(CPPDEFINES=["GODOT_MODULE_BUILD"])
# Sources to include in the module
module_sources = Glob("src/*.cpp")
module_sources += Glob("*.cpp")
module_sources = Glob("*.cpp")
env.add_source_files(env.modules_sources, module_sources)

View File

@@ -1,12 +0,0 @@
PROJECT_NAME = "dual-gdextension-module"
PROJECT_VERSION = "0.1.0"
def get_defines_friendly_name():
global PROJECT_NAME
friendly_name = PROJECT_NAME.replace("-", "_").upper()
return friendly_name
def lib_name():
return "lib" + PROJECT_NAME.replace("-", "").lower()