-
Notifications
You must be signed in to change notification settings - Fork 0
/
SConstruct
35 lines (27 loc) · 943 Bytes
/
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
platform = ARGUMENTS.get('OS', Platform())
#env = Environment(CXX = 'clang++', CXXFLAGS = '-std=c++1y -Wall')
env = Environment(CC = 'gcc', CCFLAGS = '-std=c++1y -Wall')
sources = Glob('src/*.cpp')
sources.extend(Glob('src/util/*.cpp'))
release = ARGUMENTS.get('release', 0)
if int(release):
env.Append(CXXFLAGS = ' -O2')
else:
env.Append(CXXFLAGS = ' -g')
tests = ARGUMENTS.get('tests', 0)
if int(tests):
sources.extend(Glob('tests/*.cpp'))
else:
sources.append('main.cpp')
cpppath = ['include', 'include/util', 'irrlicht', 'tests']
libs = ['yaml-cpp', 'Irrlicht', 'boost_regex', 'boost_system', 'boost_filesystem', 'GL']
libpath = ['lib']
# all the boost used:
# preprocessor in Enum
# filesystem in ResourceManager
# regex in Formula
# variant in Formula and Type
if str(platform) == "posix":
libs.append('X11')
libs.append('Xxf86vm')
env.Program('fek', sources, CPPPATH = cpppath, LIBPATH = libpath, LIBS = libs)