Clean up build scripts a bit
This commit is contained in:
@@ -2,9 +2,6 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import project_config
|
|
||||||
|
|
||||||
constant_prefix = project_config.get_defines_friendly_name()
|
|
||||||
|
|
||||||
env = SConscript("godot-cpp/SConstruct")
|
env = SConscript("godot-cpp/SConstruct")
|
||||||
|
|
||||||
@@ -21,12 +18,11 @@ env.Append(CPPPATH=["src/"])
|
|||||||
|
|
||||||
# Context-specific define for GDExtension
|
# Context-specific define for GDExtension
|
||||||
env.Append(CPPDEFINES=["GD_EXTENSION_BUILD"])
|
env.Append(CPPDEFINES=["GD_EXTENSION_BUILD"])
|
||||||
env.Append(CPPDEFINES=[f"{constant_prefix}_GDEXTENSION"])
|
|
||||||
sources = Glob("src/*.cpp")
|
sources = Glob("src/*.cpp")
|
||||||
|
|
||||||
if env["platform"] == "macos":
|
if env["platform"] == "macos":
|
||||||
library = env.SharedLibrary(
|
library = env.SharedLibrary(
|
||||||
"demo/bin/{}.{}.{}.framework/libgdexample.{}.{}".format(
|
"demo/bin/{}.{}.{}.framework/{}.{}.{}".format(
|
||||||
project_config.lib_name(),
|
project_config.lib_name(),
|
||||||
env["platform"],
|
env["platform"],
|
||||||
env["target"],
|
env["target"],
|
||||||
|
|||||||
3
SCsub
3
SCsub
@@ -7,8 +7,7 @@ Import("env")
|
|||||||
env.Append(CPPDEFINES=["GODOT_MODULE_BUILD"])
|
env.Append(CPPDEFINES=["GODOT_MODULE_BUILD"])
|
||||||
|
|
||||||
# Sources to include in the module
|
# 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)
|
env.add_source_files(env.modules_sources, module_sources)
|
||||||
|
|
||||||
|
|||||||
@@ -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()
|
|
||||||
Reference in New Issue
Block a user