-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.cake
61 lines (51 loc) · 1.54 KB
/
build.cake
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
#===------------------------------------------------------------------------===#
#
# The Descent map loader
#
# NAME : build.cake
# PURPOSE : Describes how the C++ code should be built into an executable.
# COPYRIGHT : (c) 2014 Sean Donnellan. All Rights Reserved.
# AUTHORS : Sean Donnellan ([email protected])
# DESCRIPTION : This instructs the cake build system how to compile the source
# files.
#
#===------------------------------------------------------------------------===#
from cake.tools import compiler, env, script, shell, project, variant
from cake.async import waitForAsyncResult
from cake.target import getPath
genProjects = False
env['BUILD'] = script.cwd(
'build',
variant.release + '_' + variant.architecture + '_' + variant.compiler)
sources = script.cwd([
'hog.cpp',
'hogiterator.cpp',
'rdl.cpp',
'txbiterator.cpp',
])
compiler.addDefine('_CRT_SECURE_NO_WARNINGS')
if variant.compiler == 'mingw':
compiler.addLibrary('stdc++')
compiler.enableExceptions = True
objs = compiler.objects(
targetDir=env.expand('$BUILD/objs'),
sources=sources,
language='c++',
)
prog = compiler.program(
target=script.cwd(env.expand('$BUILD'), 'hog'),
sources=objs,
)
proj = project.project(
target=script.cwd('build', 'project', 'descent'),
intermediateDir=env.expand('$BUILD/objs'),
items={
'Source': sources,
'Include': [],
'': [script.path],
},
)
sln = project.solution(
target=script.cwd('build', 'project', '_descent'),
projects=[proj],
)