mitsuba/SConstruct

90 lines
2.2 KiB
Python
Raw Normal View History

import SCons
import sys
import glob
import os
resources = []
plugins = []
stubs = []
Export('SCons', 'sys', 'os', 'glob', 'resources',
'plugins', 'stubs')
# Configure the build framework
2011-06-01 08:20:53 +08:00
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') ]
2011-06-01 08:20:53 +08:00
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
2011-06-01 08:20:53 +08:00
build('src/libcore/SConscript')
# Rendering-related APIs
2011-06-01 08:20:53 +08:00
build('src/librender/SConscript')
# Hardware acceleration
2011-06-01 08:20:53 +08:00
build('src/libhw/SConscript')
# Bidirectional support library
build('src/libbidir/SConscript')
# Python binding library
build('src/mtspy/SConscript')
# ===== Build the applications =====
env = env.Clone()
# Build the command-line binaries
2011-06-01 08:20:53 +08:00
mainEnv = build('src/mitsuba/SConscript')
# Build the COLLADA converter
2011-06-01 08:20:53 +08:00
converter_objects = build('src/converter/SConscript', ['mainEnv'])
# Build the Qt-based GUI binaries
build('src/mtsgui/SConscript', ['mainEnv', 'converter_objects'], duplicate=True)
# ===== Build the plugins =====
env['SHLIBPREFIX']=''
Export('env')
# Utilities
2011-06-01 08:20:53 +08:00
build('src/utils/SConscript')
# Surface scattering models
2011-06-01 08:20:53 +08:00
build('src/bsdfs/SConscript')
# Phase functions
2011-06-01 08:20:53 +08:00
build('src/phase/SConscript')
# Intersection shapes
2011-06-01 08:20:53 +08:00
build('src/shapes/SConscript')
# Sample generators
2011-06-01 08:20:53 +08:00
build('src/samplers/SConscript')
# Reconstruction filters
2011-06-01 08:20:53 +08:00
build('src/rfilters/SConscript')
# Film implementations
2011-06-01 08:20:53 +08:00
build('src/films/SConscript')
# Cameras
2011-06-01 08:20:53 +08:00
build('src/cameras/SConscript')
# Participating media
2011-06-01 08:20:53 +08:00
build('src/medium/SConscript')
# Volumetric data sources
2011-06-01 08:20:53 +08:00
build('src/volume/SConscript')
# Sub-surface integrators
2011-06-01 08:20:53 +08:00
build('src/subsurface/SConscript')
# Texture types
2011-06-01 08:20:53 +08:00
build('src/textures/SConscript')
# Light sources
2011-06-01 08:20:53 +08:00
build('src/luminaires/SConscript')
# Integrators
2011-06-01 08:20:53 +08:00
build('src/integrators/SConscript')
# Testcases
2011-06-01 08:20:53 +08:00
build('src/tests/SConscript')
# ===== Move everything to its proper place =====
2011-06-01 08:20:53 +08:00
SConscript('build/SConscript.install')