-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
SConstruct
57 lines (43 loc) · 1.56 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
import os, subprocess, platform, sys
libs_path = [
'E:\Godot CPP Bindings\lib'
]
libs = [
'libgodot-cpp.windows.Debug.lib',
'libgodot-cpp.windows.Release.lib'
]
include_path = [
"E:\\Godot CPP Bindings\\headers",
"E:\\Godot CPP Bindings\\include",
"E:\\Godot CPP Bindings\\include\\core",
"E:\\Godot CPP Bindings\\include\\gen"
]
env = Environment(CPPPATH = include_path)
opts = Variables([],ARGUMENTS)
opts.Add(EnumVariable
(
'target','Compilation target', 'release',
allowed_values=('debug','release'),
ignorecase = 2
)
)
opts.Update(env)
if env['target'] == 'debug':
env.Append(CCFLAGS = '/W3')
env.Append(CCFLAGS = '/MDd')
env.Append(CCFLAGS = '/Zi')
env.Append(CCFLAGS = '/EHsc')
env.Append(CCFLAGS = '/D_EBUG')
env.Append(CCFLAGS = '/FS')
Mkdir('godot\\native')
env.SharedLibrary(target='godot\\native\\gdns_lib-D', source=Glob('src\\*.cpp'), INCLUDE = include_path, LIBS = libs[0], LIBPATH = libs_path)
else:
env.Append(CCFLAGS = '/W3')
env.Append(CCFLAGS = '/MD')
env.Append(CCFLAGS = '/Zi')
env.Append(CCFLAGS = '/Ox')
env.Append(CCFLAGS = '/EHsc')
env.Append(CCFLAGS = '/DNDEBUG')
env.Append(CCFLAGS = '/FS')
Mkdir('godot\\native')
env.SharedLibrary(target='godot\\native\\gdns_lib-R', source=Glob('src\\*.cpp'), INCLUDE = include_path, LIBS = libs[1], LIBPATH = libs_path)