2010-08-10 01:38:37 +08:00
|
|
|
import SCons
|
|
|
|
import sys
|
|
|
|
import glob
|
|
|
|
import os
|
|
|
|
|
2011-02-03 16:15:25 +08:00
|
|
|
resources = []
|
|
|
|
plugins = []
|
|
|
|
stubs = []
|
2010-08-10 01:38:37 +08:00
|
|
|
|
2011-02-03 16:15:25 +08:00
|
|
|
Export('SCons', 'sys', 'os', 'glob', 'resources',
|
|
|
|
'plugins', 'stubs')
|
2010-08-10 01:38:37 +08:00
|
|
|
|
2011-02-03 16:15:25 +08:00
|
|
|
# Configure the build framework
|
|
|
|
env = SConscript('config/SConscript.configure')
|
2010-09-05 23:09:06 +08:00
|
|
|
|
2011-02-03 16:15:25 +08:00
|
|
|
Export('env')
|
2010-08-10 01:38:37 +08:00
|
|
|
|
|
|
|
if sys.platform == 'win32':
|
2011-02-03 16:15:25 +08:00
|
|
|
# Set an application icon on Windows
|
|
|
|
resources += [ env.RES('data/windows/mitsuba_res.rc') ]
|
2010-08-10 01:38:37 +08:00
|
|
|
|
2011-02-03 16:15:25 +08:00
|
|
|
# ===== Build the support libraries ====
|
2010-10-08 00:38:06 +08:00
|
|
|
|
2011-02-03 16:15:25 +08:00
|
|
|
# Core support library
|
|
|
|
SConscript('src/libcore/SConscript')
|
|
|
|
# Rendering-related APIs
|
|
|
|
SConscript('src/librender/SConscript')
|
|
|
|
# Hardware acceleration
|
|
|
|
SConscript('src/libhw/SConscript')
|
2010-08-10 01:38:37 +08:00
|
|
|
|
2011-02-03 16:15:25 +08:00
|
|
|
# ===== Build the applications =====
|
2010-08-10 01:38:37 +08:00
|
|
|
env = env.Clone()
|
|
|
|
|
2011-02-03 16:15:25 +08:00
|
|
|
# Build the command-line binaries
|
|
|
|
mainEnv = SConscript('src/mitsuba/SConscript')
|
2010-08-10 01:38:37 +08:00
|
|
|
|
2011-02-03 16:15:25 +08:00
|
|
|
# Build the COLLADA converter
|
|
|
|
converter_objects = SConscript('src/converter/SConscript', ['mainEnv'])
|
2010-08-10 01:38:37 +08:00
|
|
|
|
2011-02-03 16:15:25 +08:00
|
|
|
# Build the Qt-based GUI binaries
|
|
|
|
SConscript('src/qtgui/SConscript', ['mainEnv', 'converter_objects'])
|
2010-08-10 01:38:37 +08:00
|
|
|
|
2011-02-03 16:15:25 +08:00
|
|
|
# ===== Build the plugins =====
|
2010-08-10 01:38:37 +08:00
|
|
|
|
|
|
|
env['SHLIBPREFIX']=''
|
2011-02-03 16:15:25 +08:00
|
|
|
Export('env')
|
2010-08-10 01:38:37 +08:00
|
|
|
|
2011-02-03 16:15:25 +08:00
|
|
|
# Utilities
|
|
|
|
SConscript('src/utils/SConscript')
|
|
|
|
# Surface scattering models
|
|
|
|
SConscript('src/bsdfs/SConscript')
|
2010-08-10 01:38:37 +08:00
|
|
|
# Phase functions
|
2011-02-03 16:15:25 +08:00
|
|
|
SConscript('src/phase/SConscript')
|
|
|
|
# Intersection shapes
|
|
|
|
SConscript('src/shapes/SConscript')
|
|
|
|
# Sample generators
|
|
|
|
SConscript('src/samplers/SConscript')
|
|
|
|
# Reconstruction filters
|
|
|
|
SConscript('src/rfilters/SConscript')
|
|
|
|
# Film implementations
|
|
|
|
SConscript('src/films/SConscript')
|
2010-08-10 01:38:37 +08:00
|
|
|
# Cameras
|
2011-02-03 16:15:25 +08:00
|
|
|
SConscript('src/cameras/SConscript')
|
2010-08-10 01:38:37 +08:00
|
|
|
# Participating media
|
2011-02-03 16:15:25 +08:00
|
|
|
SConscript('src/medium/SConscript')
|
2010-08-10 01:38:37 +08:00
|
|
|
# Volumetric data sources
|
2011-02-03 16:15:25 +08:00
|
|
|
SConscript('src/volume/SConscript')
|
2010-08-10 01:38:37 +08:00
|
|
|
# Sub-surface integrators
|
2011-02-03 16:15:25 +08:00
|
|
|
SConscript('src/subsurface/SConscript')
|
2010-08-10 01:38:37 +08:00
|
|
|
# Texture types
|
2011-02-03 16:15:25 +08:00
|
|
|
SConscript('src/textures/SConscript')
|
2010-08-10 01:38:37 +08:00
|
|
|
# Light sources
|
2011-02-03 16:15:25 +08:00
|
|
|
SConscript('src/luminaires/SConscript')
|
2010-08-10 01:38:37 +08:00
|
|
|
# Integrators
|
2011-02-03 16:15:25 +08:00
|
|
|
SConscript('src/integrators/SConscript')
|
2010-09-02 23:57:04 +08:00
|
|
|
# Testcases
|
2011-02-03 16:15:25 +08:00
|
|
|
SConscript('src/tests/SConscript')
|
2010-08-10 01:38:37 +08:00
|
|
|
|
2011-02-03 16:15:25 +08:00
|
|
|
# ===== Move everything to its proper place =====
|
|
|
|
SConscript('config/SConscript.install')
|