-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSConstruct
More file actions
64 lines (52 loc) · 1.72 KB
/
SConstruct
File metadata and controls
64 lines (52 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env python
import os
import sys
# User variables
build_path = "./godot_workspace/bin"
source_path = "./src"
godotcpp_path = "./godot-cpp"
cpplua_staticlib_path = "./godot_workspace/bin/CPPAPI_static.lib"
env = SConscript(godotcpp_path+"/SConstruct")
# For reference:
# - CCFLAGS are compilation flags shared between C and C++
# - CFLAGS are for C-specific compilation flags
# - CXXFLAGS are for C++-specific compilation flags
# - CPPFLAGS are for pre-processor flags
# - CPPDEFINES are for pre-processor defines
# - LINKFLAGS are for linking flags
# tweak this if you want to use different folders, or more folders, to store your source code in.
source_list = [
source_path+"/",
source_path+"/property_modifier/",
source_path+"/testing_classes/"
]
compiled_file_ext = "*.cpp"
env.Append(CPPPATH=source_list)
sources = []
for v in source_list:
sources = sources + Glob(v + compiled_file_ext)
if env["target"] == "template_debug":
env.Append(CXXFLAGS=["/Z7", "/FS"])
env.Append(LINKFLAGS=["/DEBUG", cpplua_staticlib_path, "Advapi32.lib"])
env["debug_symbols"] = "yes"
env["optimize"] = "debug"
env["use_asan"] = "yes"
env["use_lsan"] = "yes"
env["use_msan"] = "yes"
else:
env.Append(LINKFLAGS=[cpplua_staticlib_path, "Advapi32.lib"])
if env["platform"] == "macos":
library = env.SharedLibrary(
"{}/{}.{}.{}.framework/{}.{}.{}".format(
build_path, "libgdex", env["platform"], env["target"], "libgdex", env["platform"], env["target"]
),
source=sources,
)
else:
library = env.SharedLibrary(
"{}/{}{}{}".format(
build_path, "libgdex", env["suffix"], env["SHLIBSUFFIX"]
),
source=sources,
)
Default(library)