pvb-practice/SConstruct

22 lines
545 B
Python
Raw Normal View History

2023-08-05 22:42:21 +00:00
#!/usr/bin/env python
libname = "EXTENSION-NAME"
env = SConscript("godot-cpp/SConstruct")
env.Append(CPPPATH=["src/"])
sources = Glob("src/*.cpp")
if env["platform"] == "macos":
platlibname = "{}.{}.{}".format(libname, env["platform"], env["target"])
library = env.SharedLibrary(
"bin/{}.framework/{}".format(platlibname, platlibname),
source=sources,
)
else:
library = env.SharedLibrary(
"bin/{}{}{}".format(libname, env["suffix"], env["SHLIBSUFFIX"]),
source=sources,
)
Default(library)