-
Notifications
You must be signed in to change notification settings - Fork 2
/
SConstruct
75 lines (64 loc) · 2.48 KB
/
SConstruct
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
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/env python
import os
import sys
env = SConscript("godot-cpp/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.
env.Append(CPPPATH=["src/", "src/include/"])
if env["platform"] == "android":
sources = Glob("src/*.cpp", exclude=["src/*editor.cpp"])
env.Append(LIBPATH=["demo/addons/godot_oculus_platform/bin/android/libs/arm64-v8a/"])
env.Append(LIBS=["libovrplatformloader"])
if env["target"] != "template_debug":
library = env.SharedLibrary(
"demo/addons/godot_oculus_platform/bin/libgodotoculusplatformA",
source=sources,
)
else:
# Unused
library = env.SharedLibrary(
"demo/addons/godot_oculus_platform/bin/libgodotoculusplatformAD",
source=sources,
)
else:
sources = Glob("src/*.cpp", exclude=["src/*android.cpp"])
if env["platform"] == "macos":
if env["target"] != "template_debug":
library = env.SharedLibrary(
"demo/addons/godot_oculus_platform/bin/libgodotoculusplatformM",
source=sources,
)
else:
library = env.SharedLibrary(
"demo/addons/godot_oculus_platform/bin/libgodotoculusplatformMD",
source=sources,
)
elif env["platform"] == "windows":
if env["target"] != "template_debug":
library = env.SharedLibrary(
"demo/addons/godot_oculus_platform/bin/libgodotoculusplatformW",
source=sources,
)
else:
library = env.SharedLibrary(
"demo/addons/godot_oculus_platform/bin/libgodotoculusplatformWD",
source=sources,
)
elif env["platform"] == "linux":
if env["target"] != "template_debug":
library = env.SharedLibrary(
"demo/addons/godot_oculus_platform/bin/libgodotoculusplatformL",
source=sources,
)
else:
library = env.SharedLibrary(
"demo/addons/godot_oculus_platform/bin/libgodotoculusplatformLD",
source=sources,
)
Default(library)