-
Notifications
You must be signed in to change notification settings - Fork 10
/
SConstruct
94 lines (77 loc) · 2.39 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import SCons
import sys
import glob
import os
resources = []
plugins = []
stubs = []
winstubs = []
Export('SCons', 'sys', 'os', 'glob', 'resources',
'plugins', 'stubs', 'winstubs')
# Configure the build framework
env = SConscript('build/SConscript.configure')
Export('env')
if sys.platform == 'win32':
# Set an application icon on Windows
resources += [ env.RES('data/windows/mitsuba_res.rc') ]
# Convert the command line args from UTF-8 to UTF-16
winstubs += [ env.SharedObject('#data/windows/wmain_stub.cpp') ]
Export('winstubs')
def build(scriptFile, exports = [], duplicate = 0):
dirname = '/'.join(os.path.dirname(scriptFile).split('/')[1:])
return SConscript(scriptFile, exports,
variant_dir=os.path.join(env['BUILDDIR'], dirname), duplicate=duplicate)
# ===== Build the support libraries ====
# Core support library
build('src/libcore/SConscript')
# Rendering-related APIs
build('src/librender/SConscript')
# Hardware acceleration
build('src/libhw/SConscript')
# Bidirectional support library
build('src/libbidir/SConscript')
# Python binding library
build('src/libpython/SConscript')
# ===== Build the applications =====
env = env.Clone()
# Build the command-line binaries
mainEnv = build('src/mitsuba/SConscript')
# Build the COLLADA converter
converter_objects = build('src/converter/SConscript', ['mainEnv'])
# Build the Qt-based GUI binaries
build('src/mtsgui/SConscript', ['mainEnv', 'converter_objects'], duplicate=True)
env['SHLIBPREFIX']=''
# ===== Build the plugins =====
Export('env')
# Utilities
build('src/utils/SConscript')
# Surface scattering models
build('src/bsdfs/SConscript')
# Phase functions
build('src/phase/SConscript')
# Intersection shapes
build('src/shapes/SConscript')
# Sample generators
build('src/samplers/SConscript')
# Reconstruction filters
build('src/rfilters/SConscript')
# Film implementations
build('src/films/SConscript')
# Sensors
build('src/sensors/SConscript')
# Emitters
build('src/emitters/SConscript')
# Participating media
build('src/medium/SConscript')
# Volumetric data sources
build('src/volume/SConscript')
# Sub-surface integrators
build('src/subsurface/SConscript')
# Texture types
build('src/textures/SConscript')
# Integrators
build('src/integrators/SConscript')
# Testcases
build('src/tests/SConscript')
# ===== Move everything to its proper place =====
SConscript('build/SConscript.install')