[Demo Project] Add macOS framework templates, update Scons build script and ".gdextension" file.

This commit is contained in:
bruvzg
2022-01-10 18:59:52 +02:00
parent 02d98387a1
commit a263344653
5 changed files with 62 additions and 2 deletions

View File

@@ -89,7 +89,7 @@ if env["target"] == "debug":
# Check our platform specifics
if env["platform"] == "osx":
env["target_path"] += "osx/"
env["target_path"] += "{}.{}.framework/".format(env["target_name"], env["target"])
cpp_library += ".osx"
if env["bits"] == "32":
@@ -154,7 +154,11 @@ env.Append(LIBS=[cpp_library])
env.Append(CPPPATH=["src/"])
sources = Glob("src/*.cpp")
target_name = "{}.{}.{}.{}".format(env["target_name"], env["platform"], env["target"], arch_suffix)
if env["platform"] == "osx":
target_name = "{}.{}".format(env["target_name"], env["target"])
else:
target_name = "{}.{}.{}.{}".format(env["target_name"], env["platform"], env["target"], arch_suffix)
print(target_name)
library = env.SharedLibrary(target=env["target_path"] + target_name, source=sources)