godot-cpp-template/SConstruct

22 lines
545 B
Python

#!/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)