yay -- finally merged the bidir-0.4.0 branch into default!

metadata
Wenzel Jakob 2012-09-30 17:50:59 -04:00
commit f91a344471
939 changed files with 260978 additions and 45595 deletions

View File

@ -3,10 +3,10 @@
^doc/.*\.aux$
^doc/.*\.log$
^doc/.*\.out$
^doc/.*\.pdf$
^doc/.*\.toc$
^doc/.*\.bbl$
^doc/.*\.blg$
^doc/main.pdf$
^doc/plugins_generated.tex$
# Build-related

276
CMakeLists.txt Normal file
View File

@ -0,0 +1,276 @@
# Experimental CMake file for Mitusba
# Tested only on Windows and Linux (Ubuntu 10.10)
cmake_minimum_required(VERSION 2.8.3 FATAL_ERROR)
# Internal variable to know whether this is the first time CMake runs
if (NOT DEFINED MTS_CMAKE_INIT)
set(MTS_CMAKE_INIT ON CACHE INTERNAL "Is this the initial CMake run?")
else()
set(MTS_CMAKE_INIT OFF CACHE INTERNAL "Is this the initial CMake run?")
endif()
# Allow to override the default project name "mitsuba"
if (NOT DEFINED MTS_PROJECT_NAME)
set(MTS_PROJECT_NAME "mitsuba")
endif()
project(${MTS_PROJECT_NAME})
# Tell cmake where to find the additional modules
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/data/cmake")
# Make sure the cmake-provided modules use the versions they expect
if(NOT CMAKE_VERSION VERSION_LESS "2.8.4")
cmake_policy(SET CMP0017 NEW)
endif()
# Enable folders for projects in Visual Studio
if (CMAKE_GENERATOR MATCHES "Visual Studio")
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()
# Set CMAKE_BUILD_TYPE to Release by default
if (MTS_CMAKE_INIT AND DEFINED CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
"Choose the type of build, options are: Debug, Release, RelWithDebInfo, MinSizeRel." FORCE)
endif()
# Load the required modules
include (MitsubaUtil)
include (CheckCXXSourceCompiles)
include (CMakeDependentOption)
# Read version (MTS_VERSION) from include/mitsuba/core/version.h
file(STRINGS "include/mitsuba/core/version.h" MITSUBA_H REGEX "^#define MTS_VERSION \"[^\"]*\"$")
string(REGEX REPLACE "^.*MTS_VERSION \"([0-9]+).*$" "\\1" MTS_VERSION_MAJOR "${MITSUBA_H}")
string(REGEX REPLACE "^.*MTS_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" MTS_VERSION_MINOR "${MITSUBA_H}")
string(REGEX REPLACE "^.*MTS_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" MTS_VERSION_PATCH "${MITSUBA_H}")
set(MTS_VERSION "${MTS_VERSION_MAJOR}.${MTS_VERSION_MINOR}.${MTS_VERSION_PATCH}")
set(MITSUBA_H)
if("${MTS_VERSION_MAJOR}" MATCHES "[0-9]+" AND
"${MTS_VERSION_MINOR}" MATCHES "[0-9]+" AND
"${MTS_VERSION_PATCH}" MATCHES "[0-9]+")
message(STATUS "mitsuba ${MTS_VERSION}")
else()
message(FATAL_ERROR "The mitsuba version could not be determined!")
endif()
########################### External libraries ################################
include (MitsubaExternal)
###############################################################################
# CONFIGURATION AND DEFAULT DEFINITIONS & INCLUDES #
###############################################################################
# Image format definitions
if (PNG_FOUND)
add_definitions(-DMTS_HAS_LIBPNG=1)
endif()
if (JPEG_FOUND)
add_definitions(-DMTS_HAS_LIBJPEG=1)
endif()
if (OPENEXR_FOUND)
add_definitions(-DMTS_HAS_OPENEXR=1)
endif()
# Top level configuration definitions
option(MTS_DEBUG "Enable assertions etc. Usually a good idea." ON)
if (MTS_DEBUG)
add_definitions(-DMTS_DEBUG)
endif()
option(MTS_KD_DEBUG "Enable additional checks in the kd-Tree.
This is quite slow and mainly useful to track down bugs when they are suspected."
OFF)
if (MTS_KD_DEBUG)
add_definitions(-DMTS_KD_DEBUG)
endif()
option(MTS_KD_CONSERVE_MEMORY
"Use less memory for storing geometry (at the cost of speed)." OFF)
if (MTS_KD_CONSERVE_MEMORY)
add_definitions(-DMTS_KD_CONSERVE_MEMORY)
endif()
option(MTS_SINGLE_PRECISION
"Do all computation in single precision. This is usually sufficient." ON)
if (MTS_SINGLE_PRECISION)
add_definitions(-DSINGLE_PRECISION)
endif()
set(MTS_SPECTRUM_SAMPLES 3 CACHE STRING
"Number of spectral samples used to render. The default is 3 (RGB-mode).
For high-quality spectral rendering, this should be set to 30 or higher.")
if(NOT "${MTS_SPECTRUM_SAMPLES}" MATCHES "^[1-9][0-9]*$" OR
MTS_SPECTRUM_SAMPLES LESS 3 OR MTS_SPECTRUM_SAMPLES GREATER 2048)
message(FATAL_ERROR
"Invalid number of spectrum samples: ${MTS_SPECTRUM_SAMPLES}. Valid values: [3,2048]")
else()
add_definitions(-DSPECTRUM_SAMPLES=${MTS_SPECTRUM_SAMPLES})
endif()
CMAKE_DEPENDENT_OPTION (MTS_DOUBLE_PRECISION
"Do all computation in double precision." ON
"NOT MTS_SINGLE_PRECISION" OFF)
if (MTS_DOUBLE_PRECISION)
add_definitions(-DDOUBLE_PRECISION)
endif()
CMAKE_DEPENDENT_OPTION (MTS_SSE "Activate optimized SSE routines." ON
"NOT MTS_DOUBLE_PRECISION" OFF)
if (MTS_SSE)
add_definitions(-DMTS_SSE)
endif ()
CMAKE_DEPENDENT_OPTION (MTS_HAS_COHERENT_RT
"Include coherent ray tracing support." ON
"MTS_SSE" OFF)
if (MTS_HAS_COHERENT_RT)
add_definitions(-DMTS_HAS_COHERENT_RT)
endif()
CMAKE_DEPENDENT_OPTION (MTS_DEBUG_FP
"Generated NaNs will cause floating point exceptions, which can be caught in a debugger (very slow!)" OFF
"NOT MTS_DOUBLE_PRECISION" OFF)
if (MTS_DEBUG_FP)
add_definitions(-DMTS_DEBUG_FP)
endif()
# Options to disable MSVC STL debug + security features (slow..!)
if (MSVC OR (WIN32 AND CMAKE_C_COMPILER_ID MATCHES "Intel"))
# _SECURE_SCL already defaults to 0 in release mode in MSVC 2010
if(MSVC_VERSION LESS 1600)
option(MTS_NO_CHECKED_ITERATORS "Disable checked iterators in MSVC" OFF)
option(MTS_NO_ITERATOR_DEBUGGING "Disable iterator debugging in MSVC" OFF)
else()
set(MTS_NO_CHECKED_ITERATORS OFF)
set(MTS_NO_ITERATOR_DEBUGGING OFF)
endif()
option(MTS_NO_BUFFER_CHECKS "Disable the buffer security checks in MSVC" ON)
if (MTS_NO_ITERATOR_DEBUGGING)
add_definitions (-D_HAS_ITERATOR_DEBUGGING=0)
endif()
if (MTS_NO_CHECKED_ITERATORS OR MTS_NO_ITERATOR_DEBUGGING)
add_definitions (-D_SECURE_SCL=0 -D_SCL_SECURE_NO_WARNINGS)
message (WARNING "The secure iterators were manually disabled. There might be incompatibility problems.")
endif ()
if (MTS_NO_BUFFER_CHECKS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /GS-")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GS-")
endif()
endif()
# Platform-specific definitions
if (WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
add_definitions(-DWIN64)
endif()
# Main mitsuba include directory
include_directories("include")
# Includes for the common libraries
include_directories(${Boost_INCLUDE_DIRS} ${Eigen_INCLUDE_DIR})
# If we are using the system OpenEXR, add its headers which half.h requires
if (OPENEXR_FOUND)
include_directories(${ILMBASE_INCLUDE_DIRS})
endif()
###############################################################################
# CORE MODULES, APPLICATIONS AND PLUGINS #
###############################################################################
# ===== Prerequisite resources =====
# Process the XML schemas
add_subdirectory(data/schema)
# Add the IOR database
add_subdirectory(data/ior)
# Microfacet precomputed data
add_subdirectory(data/microfacet)
# ===== Build the support libraries ====
# Core support library
add_subdirectory(src/libcore)
# Rendering-related APIs
add_subdirectory(src/librender)
# Hardware acceleration
add_subdirectory(src/libhw)
# Bidirectional support library
add_subdirectory(src/libbidir)
# Python binding library
if (BUILD_PYTHON)
add_subdirectory(src/libpython)
elseif(NOT PYTHON_FOUND)
message(STATUS "Python was not found. The bindings will not be built.")
endif()
# Additional files to add to main executables
if(APPLE)
set(MTS_DARWIN_STUB "${CMAKE_CURRENT_SOURCE_DIR}/src/mitsuba/darwin_stub.mm")
endif()
# ===== Build the applications =====
# Build the command-line binaries
add_subdirectory(src/mitsuba)
# Build the COLLADA converter
if (COLLADA_FOUND)
add_subdirectory(src/converter)
else()
message(STATUS "Collada DOM was not found. The importer will not be built.")
endif()
# Build the Qt-based GUI binaries
if (BUILD_GUI)
add_subdirectory(src/mtsgui)
elseif(NOT QT4_FOUND)
message(STATUS "Qt4 was not found. The mitsuba gui will not be built.")
endif()
# ===== Build the plugins =====
# Utilities
add_subdirectory(src/utils)
# Surface scattering models
add_subdirectory(src/bsdfs)
# Phase functions
add_subdirectory(src/phase)
# Intersection shapes
add_subdirectory(src/shapes)
# Sample generators
add_subdirectory(src/samplers)
# Reconstruction filters
add_subdirectory(src/rfilters)
# Film implementations
add_subdirectory(src/films)
# Sensors
add_subdirectory(src/sensors)
# Emitters
add_subdirectory(src/emitters)
# Participating media
add_subdirectory(src/medium)
# Volumetric data sources
add_subdirectory(src/volume)
# Sub-surface integrators
add_subdirectory(src/subsurface)
# Texture types
add_subdirectory(src/textures)
# Integrators
add_subdirectory(src/integrators)
# Testcases
add_subdirectory(src/tests)
# ===== Packaging =====
# Use a subdirectory to enforce that packaging runs after all other targets
add_subdirectory(data/cmake/packaging)

View File

@ -69,8 +69,10 @@ build('src/samplers/SConscript')
build('src/rfilters/SConscript')
# Film implementations
build('src/films/SConscript')
# Cameras
build('src/cameras/SConscript')
# Sensors
build('src/sensors/SConscript')
# Emitters
build('src/emitters/SConscript')
# Participating media
build('src/medium/SConscript')
# Volumetric data sources
@ -79,8 +81,6 @@ build('src/volume/SConscript')
build('src/subsurface/SConscript')
# Texture types
build('src/textures/SConscript')
# Light sources
build('src/luminaires/SConscript')
# Integrators
build('src/integrators/SConscript')
# Testcases

View File

@ -23,63 +23,71 @@ if not os.path.exists(configFile):
print '\nA configuration file must be selected! Have a look at http://www.mitsuba-renderer.org/docs.html'
Exit(1)
if not os.path.exists(GetBuildPath('#dependencies')):
print '\nThe build dependency files are missing -- please check them out'
print 'from Mercurial by running the following command *inside* the '
print 'Mitsuba directory:\n'
print '$ hg clone https://www.mitsuba-renderer.org/hg/dependencies\n'
needsBuildDependencies = (sys.platform == 'win32' or sys.platform == 'darwin')
if needsBuildDependencies and not os.path.exists(GetBuildPath('#dependencies')):
print '\nThe required build dependency files are missing. Please see the documentation'
print 'at http://www.mitsuba-renderer.org/docs.html for details on how to get them.\n'
Exit(1)
python_versions = ["2.6", "2.7", "3.0", "3.1", "3.2"]
# Parse configuration options
vars = Variables(configFile)
vars.Add('BUILDDIR', 'Target directory for intermediate files')
vars.Add('DISTDIR', 'Target directory for the final build')
vars.Add('CXX', 'C++ compiler')
vars.Add('CC', 'C compiler')
vars.Add('CXXFLAGS', 'C++ flags')
vars.Add('SHCXXFLAGS', 'Extra C++ flags (for shared libraries)')
vars.Add('CCFLAGS', 'Extra C++ flags (for C files)')
vars.Add('LINK', 'Linker')
vars.Add('LINKFLAGS', 'Linker flags')
vars.Add('SHLINKFLAGS', 'Linker flags (dynamic libraries)')
vars.Add('BASEINCLUDE', 'Base include path')
vars.Add('BASELIB', 'Base libraries')
vars.Add('BASELIBDIR', 'Base library search path')
vars.Add('PYTHONINCLUDE', 'Python include path')
vars.Add('PYTHONLIB', 'Python libraries')
vars.Add('PYTHONLIBDIR', 'Python library path')
vars.Add('XERCESINCLUDE', 'Xerces-C include path')
vars.Add('XERCESLIB', 'Xerces-C libraries')
vars.Add('XERCESLIBDIR', 'Xerces-C library path')
vars.Add('OEXRINCLUDE', 'OpenEXR include path')
vars.Add('OEXRLIB', 'OpenEXR libraries')
vars.Add('OEXRFLAGS', 'OpenEXR-related compiler flags')
vars.Add('OEXRLIBDIR', 'OpenEXR library path')
vars.Add('PNGINCLUDE', 'libpng include path')
vars.Add('PNGLIB', 'libpng libraries')
vars.Add('PNGLIBDIR', 'libpng library path')
vars.Add('JPEGINCLUDE', 'libjpeg include path')
vars.Add('JPEGLIB', 'libjpeg libraries')
vars.Add('JPEGLIBDIR', 'libjpeg library path')
vars.Add('COLLADAINCLUDE','COLLADA DOM include path')
vars.Add('COLLADALIB', 'COLLADA DOM libraries')
vars.Add('COLLADALIBDIR', 'COLLADA DOM library path')
vars.Add('SHLIBPREFIX', 'Prefix for shared libraries')
vars.Add('SHLIBSUFFIX', 'Suffix for shared libraries')
vars.Add('LIBPREFIX', 'Prefix for windows library files')
vars.Add('LIBSUFFIX', 'Suffix for windows library files')
vars.Add('PROGSUFFIX', 'Suffix for executables')
vars.Add('GLLIB', 'OpenGL+GLEW libraries')
vars.Add('GLINCLUDE', 'OpenGL+GLEW include path')
vars.Add('GLFLAGS', 'OpenGL+GLEW-related compiler flags')
vars.Add('GLLIBDIR', 'OpenGL+GLEW library path')
vars.Add('BOOSTINCLUDE', 'Boost include path')
vars.Add('BOOSTLIB', 'Boost libraries')
vars.Add('BOOSTLIBDIR', 'Boost library path')
vars.Add('TARGET_ARCH', 'Target architecture')
vars.Add('MSVC_VERSION', 'MS Visual C++ compiler version')
vars.Add('QTDIR', 'Qt installation directory')
vars.Add('INTEL_COMPILER','Should the Intel C++ compiler be used?')
vars.Add('BUILDDIR', 'Target directory for intermediate files')
vars.Add('DISTDIR', 'Target directory for the final build')
vars.Add('CXX', 'C++ compiler')
vars.Add('CC', 'C compiler')
vars.Add('CXXFLAGS', 'C++ flags')
vars.Add('SHCXXFLAGS', 'Extra C++ flags (for shared libraries)')
vars.Add('CCFLAGS', 'Extra C++ flags (for C files)')
vars.Add('LINK', 'Linker')
vars.Add('LINKFLAGS', 'Linker flags')
vars.Add('SHLINKFLAGS', 'Linker flags (dynamic libraries)')
vars.Add('BASEINCLUDE', 'Base include path')
vars.Add('BASELIB', 'Base libraries')
vars.Add('BASELIBDIR', 'Base library search path')
for ver in python_versions:
key = ver.replace('.', '')
vars.Add('PYTHON' + key + 'INCLUDE', 'Python '+ ver +' include path')
vars.Add('PYTHON' + key + 'LIB', 'Python '+ ver +' libraries')
vars.Add('PYTHON' + key + 'LIBDIR', 'Python '+ ver +' library path')
vars.Add('EIGENINCLUDE', 'Eigen 3.x include path')
vars.Add('XERCESINCLUDE', 'Xerces-C include path')
vars.Add('XERCESLIB', 'Xerces-C libraries')
vars.Add('XERCESLIBDIR', 'Xerces-C library path')
vars.Add('OEXRINCLUDE', 'OpenEXR include path')
vars.Add('OEXRLIB', 'OpenEXR libraries')
vars.Add('OEXRFLAGS', 'OpenEXR-related compiler flags')
vars.Add('OEXRLIBDIR', 'OpenEXR library path')
vars.Add('PNGINCLUDE', 'libpng include path')
vars.Add('PNGLIB', 'libpng libraries')
vars.Add('PNGLIBDIR', 'libpng library path')
vars.Add('JPEGINCLUDE', 'libjpeg include path')
vars.Add('JPEGLIB', 'libjpeg libraries')
vars.Add('JPEGLIBDIR', 'libjpeg library path')
vars.Add('COLLADAINCLUDE', 'COLLADA DOM include path')
vars.Add('COLLADALIB', 'COLLADA DOM libraries')
vars.Add('COLLADALIBDIR', 'COLLADA DOM library path')
vars.Add('SHLIBPREFIX', 'Prefix for shared libraries')
vars.Add('SHLIBSUFFIX', 'Suffix for shared libraries')
vars.Add('LIBPREFIX', 'Prefix for windows library files')
vars.Add('LIBSUFFIX', 'Suffix for windows library files')
vars.Add('PROGSUFFIX', 'Suffix for executables')
vars.Add('GLLIB', 'OpenGL+GLEW libraries')
vars.Add('GLINCLUDE', 'OpenGL+GLEW include path')
vars.Add('GLFLAGS', 'OpenGL+GLEW-related compiler flags')
vars.Add('GLLIBDIR', 'OpenGL+GLEW library path')
vars.Add('BOOSTINCLUDE', 'Boost include path')
vars.Add('BOOSTLIB', 'Boost libraries')
vars.Add('BOOSTLIBDIR', 'Boost library path')
vars.Add('TARGET_ARCH', 'Target architecture')
vars.Add('MSVC_VERSION', 'MS Visual C++ compiler version')
vars.Add('QTDIR', 'Qt installation directory')
vars.Add('QTINCLUDE', 'Additional Qt include directory')
vars.Add('INTEL_COMPILER', 'Should the Intel C++ compiler be used?')
try:
env = Environment(options=vars, ENV = os.environ, tools=['default', 'qt4', 'icl12'], toolpath=['#data/scons'])
@ -91,7 +99,7 @@ except Exception:
hasQt = False
hasCollada=True
hasPython = True
hasPython = []
env.Append(CPPPATH=env['BASEINCLUDE'])
env.Append(CPPFLAGS=[])
@ -105,6 +113,12 @@ if env.has_key('BOOSTLIB'):
env.Prepend(LIBS=env['BOOSTLIB'])
if env.has_key('BASELIBDIR'):
env.Append(LIBPATH=env['BASELIBDIR'])
if env.has_key('OEXRINCLUDE'):
env.Prepend(CPPPATH=env['OEXRINCLUDE'])
if env.has_key('OEXRLIBDIR'):
env.Prepend(LIBPATH=env['OEXRLIBDIR'])
if env.has_key('EIGENINCLUDE'):
env.Prepend(CPPPATH=env['EIGENINCLUDE'])
env.Decider('MD5-timestamp')
@ -149,8 +163,6 @@ if env.has_key('COLLADAINCLUDE'):
env.Prepend(CPPPATH=env['COLLADAINCLUDE'])
if env.has_key('COLLADALIBDIR'):
env.Prepend(LIBPATH=env['COLLADALIBDIR'])
if env.has_key('PYTHONINCLUDE'):
env.Prepend(CPPPATH=env['PYTHONINCLUDE'])
if not conf.CheckCXX():
print 'Could not compile a simple C++ fragment, verify that ' + \
@ -159,25 +171,50 @@ if not conf.CheckCXX():
'contain more information.'
Exit(1)
if not conf.CheckCHeader(['png.h']):
print 'libpng is missing (install libpng12-dev)'
Exit(1)
print 'libpng is missing (install libpng12-dev for PNG I/O support)'
else:
env.Append(CPPDEFINES = [['MTS_HAS_LIBPNG', 1]] )
if not conf.CheckCHeader(['stdio.h', 'jpeglib.h']):
print 'libjpeg is missing (install libjpeg62-dev)'
Exit(1)
print 'libjpeg is missing (install libjpeg62-dev for JPEG I/O support)'
else:
env.Append(CPPDEFINES = [['MTS_HAS_LIBJPEG', 1]] )
if not conf.CheckCXXHeader('ImfRgba.h'):
print 'OpenEXR is missing (install libopenexr-dev)'
Exit(1)
print 'OpenEXR is missing (install libopenexr-dev for OpenEXR I/O support)'
else:
env.Append(CPPDEFINES = [['MTS_HAS_OPENEXR', 1]] )
if not conf.CheckCXXHeader('xercesc/dom/DOMLSParser.hpp'):
print 'Xerces-C++ 3.x must be installed (install libxerces-c-dev)!'
Exit(1)
if not conf.CheckCXXHeader('dae.h'):
hasCollada = False
print 'COLLADA DOM is missing: not building the COLLADA importer'
if not conf.CheckCXXHeader('pyconfig.h'):
hasPython = False
print 'Python is missing: not building the python support library'
if not conf.CheckCXXHeader('boost/math/distributions/students_t.hpp'):
print 'Boost is missing (install libboost-dev)!'
hasBreakpad = '-DMTS_HAS_BREAKPAD' in env['CCFLAGS'] or 'MTS_HAS_BREAKPAD' in env['CXXFLAGS']
hasPython = []
for ver in python_versions:
key = 'PYTHON' + ver.replace('.', '') + 'INCLUDE'
if key not in env:
continue
includePath = env[key]
env.Append(CPPPATH=includePath)
if conf.CheckCXXHeader('pyconfig.h'):
hasPython += [ ver ]
else:
print 'Python ' + ver + ' is missing: not building wrappers'
env['CPPPATH'][:] = [ x for x in env['CPPPATH'] if x not in includePath ]
if not conf.CheckCXXHeader('boost/version.hpp'):
print 'Boost is missing (install libboost-all-dev)!'
Exit(1)
if not conf.TryCompile("#include <boost/version.hpp>\n#if BOOST_VERSION < 104400\n#error Boost is outdated!\n#endif", ".cpp"):
print 'Boost is outdated (you will need version 1.44 or newer)!'
Exit(1)
if not conf.CheckCXXHeader('Eigen/Core'):
print 'Eigen 3.x is missing (install libeigen3-dev)!'
Exit(1)
if sys.platform == 'win32':
if not (conf.CheckCHeader(['windows.h', 'GL/gl.h']) \
@ -231,28 +268,29 @@ else:
print MTS_VERSION
Export('MTS_VERSION')
versionFilename = GetBuildPath('#dependencies/version')
versionMismatch = False
if needsBuildDependencies:
versionFilename = GetBuildPath('#dependencies/version')
versionMismatch = False
if not os.path.exists(versionFilename):
versionMismatch = True
depVersion = "<unknown>"
else:
with open(versionFilename) as f:
depVersion = f.readline().strip()
if MTS_VERSION != depVersion:
versionMismatch = True
if not os.path.exists(versionFilename):
versionMismatch = True
depVersion = "<unknown>"
else:
with open(versionFilename) as f:
depVersion = f.readline().strip()
if MTS_VERSION != depVersion:
versionMismatch = True
if versionMismatch:
print '\nThe dependency directory and your Mitsuba codebase have different version'
print 'numbers! Your copy of Mitsuba has version %s, whereas the dependencies ' % MTS_VERSION
print 'have version %s. Please bring them into sync, either by running\n' % depVersion
print '$ hg update -r v%s\n' % depVersion
print 'in the Mitsuba directory, or by running\n'
print '$ cd dependencies'
print '$ hg pull'
print '$ hg update -r v%s\n' % MTS_VERSION
Exit(1)
if versionMismatch:
print '\nThe dependency directory and your Mitsuba codebase have different version'
print 'numbers! Your copy of Mitsuba has version %s, whereas the dependencies ' % MTS_VERSION
print 'have version %s. Please bring them into sync, either by running\n' % depVersion
print '$ hg update -r v%s\n' % depVersion
print 'in the Mitsuba directory, or by running\n'
print '$ cd dependencies'
print '$ hg pull'
print '$ hg update -r v%s\n' % MTS_VERSION
Exit(1)
env = conf.Finish()
@ -262,21 +300,30 @@ Export('dist')
def osxlibinst_build_function(self, target, source, pkgname = None, use_own = None):
inst = self.Install(target, source)
prefix, name = os.path.split(source)
self.AddPostAction(inst, 'install_name_tool -id @loader_path/../Frameworks/' + name + ' $TARGET')
self.AddPostAction(inst, 'install_name_tool -id @rpath/' + name + ' $TARGET')
return inst
def osxlibinst_as_build_function(self, target, source, pkgname = None, use_own = None):
inst = self.InstallAs(target, source)
prefix, name = os.path.split(source)
self.AddPostAction(inst, 'install_name_tool -id @loader_path/../Frameworks/' + name + ' $TARGET')
self.AddPostAction(inst, 'install_name_tool -id @rpath/' + name + ' $TARGET')
return inst
def remove_flag(env, flag):
try:
success = False
if flag in env['CXXFLAGS']:
env['CXXFLAGS'].remove(flag)
return True
except:
return False
success = True
if flag in env['SHCXXFLAGS']:
env['SHCXXFLAGS'].remove(flag)
success = True
if flag in env['CFLAGS']:
env['CFLAGS'].remove(flag)
success = True
if flag in env['LINKFLAGS']:
env['LINKFLAGS'].remove(flag)
success = True
return success
def match_pattern(x, patterns):
match = False
@ -289,6 +336,7 @@ def match_pattern(x, patterns):
def remove_flags(env, patterns):
env['CCFLAGS'][:] = [ x for x in env['CCFLAGS'] if not match_pattern(x, patterns) ]
env['CXXFLAGS'][:] = [ x for x in env['CXXFLAGS'] if not match_pattern(x, patterns) ]
env['SHCXXFLAGS'][:] = [ x for x in env['SHCXXFLAGS'] if not match_pattern(x, patterns) ]
env['LINKFLAGS'][:] = [ x for x in env['LINKFLAGS'] if not match_pattern(x, patterns) ]
def append_flag(env, value):
@ -316,7 +364,7 @@ def relax_compiler_settings(env):
# Relax the compiler settings when compiling heavy templated code
# (e.g. Boost::Spirit parsers, etc., which don't necessarily have
# to be that fast)
env.RemoveFlags(['-g', '/Z7', '-ipo', '/GL'])
env.RemoveFlags(['-g', '/Z7', '/Zi', '-ipo', '/GL', '/DEBUG'])
if env.RemoveFlag('-O3'):
env.AppendFlag('-Os')
if env.RemoveFlag('/O2'):
@ -335,6 +383,6 @@ if sys.platform == 'win32':
env['LINKCOM'] = [env['LINKCOM'], 'mt.exe -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;1']
env['SHLINKCOM'] = [env['SHLINKCOM'], 'mt.exe -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;2']
env.Export('hasQt', 'hasCollada', 'hasPython', 'resources')
env.Export('hasQt', 'hasCollada', 'hasPython', 'resources', 'hasBreakpad')
Return('env')

View File

@ -1,21 +1,10 @@
import fnmatch
Import('env', 'os', 'sys', 'plugins', 'dist',
'MTS_VERSION', 'hasQt', 'hasCollada', 'hasPython')
'MTS_VERSION', 'hasQt', 'hasCollada', 'hasPython', 'hasBreakpad')
installTargets = []
def fixOSXPluginPath(plugin):
return env.AddPostAction(plugin,
'install_name_tool -change @loader_path/../Frameworks/libmitsuba-core.dylib @loader_path/../Contents/Frameworks/libmitsuba-core.dylib ${TARGET}; ' +
'install_name_tool -change @loader_path/../Frameworks/libmitsuba-render.dylib @loader_path/../Contents/Frameworks/libmitsuba-render.dylib ${TARGET}; ' +
'install_name_tool -change @loader_path/../Frameworks/libmitsuba-hw.dylib @loader_path/../Contents/Frameworks/libmitsuba-hw.dylib ${TARGET}; ' +
'install_name_tool -change @loader_path/../Frameworks/libmitsuba-bidir.dylib @loader_path/../Contents/Frameworks/libmitsuba-bidir.dylib ${TARGET}; ' +
'install_name_tool -change @loader_path/../Frameworks/libboost_system.dylib @loader_path/../Contents/Frameworks/libboost_system.dylib ${TARGET}; ' +
'install_name_tool -change @loader_path/../Frameworks/libboost_filesystem.dylib @loader_path/../Contents/Frameworks/libboost_filesystem.dylib ${TARGET};' +
'install_name_tool -change @loader_path/../Frameworks/libboost_python.dylib @loader_path/../Contents/Frameworks/libboost_python.dylib ${TARGET}'
)
def install(target, paths, prefix = None):
global installTargets
if prefix == None:
@ -59,8 +48,8 @@ if sys.platform == 'linux2':
installTargets += env.Install(os.path.join(distDir, 'plugins'), plugin)
install(distDir, ['libcore/libmitsuba-core.so', 'libhw/libmitsuba-hw.so',
'librender/libmitsuba-render.so', 'libbidir/libmitsuba-bidir.so'])
if hasPython:
install(os.path.join(distDir, 'python'), ['libpython/mitsuba.so'])
for ver in hasPython:
installAs(os.path.join(distDir, 'python/'+ver+'/mitsuba.so'), 'libpython/mitsuba_python' + ver + '.so')
install(distDir, ['mitsuba/mitsuba', 'mitsuba/mtssrv', 'mitsuba/mtsutil'])
if hasQt:
install(distDir, ['mtsgui/mtsgui'])
@ -72,9 +61,9 @@ if sys.platform == 'win32':
installTargets += env.Install(os.path.join(distDir, 'plugins'), plugin)
if 'WIN64' in env['CXXFLAGS']:
dllprefix='#dependencies/windows/lib64'
dllprefix='#dependencies/lib/x64'
else:
dllprefix='#dependencies/windows/lib32'
dllprefix='#dependencies/lib/i386'
if env['MSVC_VERSION'] == '9.0':
compilerType = 'vc90'
@ -92,23 +81,26 @@ if sys.platform == 'win32':
install(distDir, ['libcore/libmitsuba-core.dll', 'libhw/libmitsuba-hw.dll',
'librender/libmitsuba-render.dll', 'libbidir/libmitsuba-bidir.dll'])
install(sdkLibDir, ['libcore/mitsuba-core.lib', 'libhw/mitsuba-hw.lib',
'librender/mitsuba-render.lib', 'libbidir/mitsuba-bidir.lib'])
'librender/mitsuba-render.lib', 'libbidir/mitsuba-bidir.lib'])
for entry in os.walk(os.path.join(basePath, "include")):
includeDir = entry[0][len(basePath)+1:]
installTargets += env.Install(os.path.join(sdkDir, includeDir),
[ ('#' + os.path.join(includeDir, fname)) for fname in entry[2] ])
if hasPython:
installAs(os.path.join(distDir, 'python/mitsuba.pyd'), 'libpython/mitsuba.dll')
for ver in hasPython:
installAs(os.path.join(distDir, 'python/'+ver+'/mitsuba.pyd'), 'libpython/mitsuba_python' + ver + '.dll')
install(distDir, ['Iex.dll', 'Half.dll','IlmThread.dll', 'Imath.dll','IlmImf.dll','zlib1.dll',
'libpng13.dll', 'jpeg62.dll', 'pthreadVCE2.dll', 'xerces-c_3_0.dll', 'glew32mx.dll'],
'libpng15.dll', 'jpeg62.dll', 'xerces-c_3_1.dll', 'glew32mx.dll'],
prefix=dllprefix)
install(distDir, ['libcollada14dom23.dll', 'boost_python-%s-mt-1_44.dll' % compilerType,
'boost_system-%s-mt-1_44.dll' % compilerType, 'boost_filesystem-%s-mt-1_44.dll' % compilerType],
dllprefix + '/' + compilerType + '/')
install(distDir, ['libcollada14dom23.dll',
'boost_python-vc100-mt-1_50.dll', 'boost_python3-vc100-mt-1_50.dll',
'boost_system-vc100-mt-1_50.dll', 'boost_filesystem-vc100-mt-1_50.dll',
'boost_chrono-vc100-mt-1_50.dll', 'boost_thread-vc100-mt-1_50.dll'],
dllprefix)
if 'WIN64' in env['CXXFLAGS']:
installTargets += env.Install(distDir, '#dependencies/windows/bin/vcredist_2010_sp1_x64.exe')
installTargets += env.Install(distDir, '#dependencies/bin/vcredist_2010_sp1_x64.exe')
else:
installTargets += env.Install(distDir, '#dependencies/windows/bin/vcredist_2010_sp1_x86.exe')
installTargets += env.Install(distDir, '#dependencies/bin/vcredist_2010_sp1_x86.exe')
installTargets += env.Install(distDir, '#data/windows/README.txt')
if 'REDIST_PATH' in env:
@ -117,11 +109,11 @@ if sys.platform == 'win32':
if hasQt:
install(distDir, ['mtsgui/mtsgui.exe'])
install(distDir, ['QtCore4.dll', 'QtGui4.dll', 'QtXml4.dll',
'QtNetwork4.dll', 'QtOpenGL4.dll', 'QtXmlPatterns4.dll'], prefix = env['QT4_BINPATH'])
'QtNetwork4.dll', 'QtOpenGL4.dll', 'QtXmlPatterns4.dll'], prefix = env['QT4_LIBPATH'])
elif sys.platform == 'darwin':
for i in plugins:
plugin = env.Install(os.path.join(distDir, 'plugins'), i)
installTargets += fixOSXPluginPath(plugin)
installTargets += plugin
for entry in os.walk(os.path.join(basePath, "include")):
includeDir = entry[0][len(basePath)+1:]
installTargets += env.Install(os.path.join(os.path.join(distDir, 'Headers'), includeDir),
@ -138,45 +130,36 @@ elif sys.platform == 'darwin':
install(frameworkDir, ['libcore/libmitsuba-core.dylib', 'libhw/libmitsuba-hw.dylib',
'librender/libmitsuba-render.dylib', 'libbidir/libmitsuba-bidir.dylib'])
if hasPython:
plugin = installAs(os.path.join(distDir, 'python/mitsuba.so'), 'libpython/mitsuba.dylib')
installTargets += fixOSXPluginPath(plugin)
install(frameworkDir, [
'GLEW.framework/Resources/libs/libGLEW.dylib', 'OpenEXR.framework/Resources/lib/libHalf.6.dylib',
'OpenEXR.framework/Resources/lib/libIex.6.dylib', 'OpenEXR.framework/Resources/lib/libImath.6.dylib',
'OpenEXR.framework/Resources/lib/libIlmThread.6.dylib', 'OpenEXR.framework/Resources/lib/libIlmImf.6.dylib',
'Xerces-C.framework/Resources/lib/libxerces-c-3.0.dylib', 'libpng.framework/Resources/lib/libpng.dylib',
'libjpeg.framework/Resources/lib/libjpeg.dylib', 'libboost.framework/Resources/lib/libboost_python.dylib',
'libboost.framework/Resources/lib/libboost_system.dylib',
'libboost.framework/Resources/lib/libboost_filesystem.dylib'], '#dependencies/darwin')
if hasCollada:
install(frameworkDir, [
'Collada14Dom.framework/Resources/lib/libCollada14Dom.dylib'], '#dependencies/darwin')
for ver in hasPython:
installTargets += installAs(os.path.join(distDir, 'python/'+ver+'/mitsuba.so'), 'libpython/mitsuba_python'+ver+'.dylib')
for entry in os.walk(os.path.join(basePath, "dependencies/lib")):
installTargets += env.Install(frameworkDir, ['#' + os.path.join('dependencies/lib', e) for e in entry[2] if not os.path.islink(os.path.join(entry[0], e))])
if hasQt:
install(os.path.join(distDir, 'Contents/MacOS'), ['mtsgui/mtsgui'])
install(os.path.join(distDir, 'Contents/MacOS'), ['mtsgui/symlinks_install'])
installTargets += env.OSXLibInst(frameworkDir, '/Library/Frameworks/QtCore.framework/Versions/4/QtCore')
opengl = env.OSXLibInst(frameworkDir, '/Library/Frameworks/QtOpenGL.framework/Versions/4/QtOpenGL')
xml = env.OSXLibInst(frameworkDir, '/Library/Frameworks/QtXml.framework/Versions/4/QtXml')
xmlpatterns = env.OSXLibInst(frameworkDir, '/Library/Frameworks/QtXmlPatterns.framework/Versions/4/QtXmlPatterns')
network = env.OSXLibInst(frameworkDir, '/Library/Frameworks/QtNetwork.framework/Versions/4/QtNetwork')
gui = env.OSXLibInst(frameworkDir, '/Library/Frameworks/QtGui.framework/Versions/4/QtGui')
installTargets += env.AddPostAction(xml, 'install_name_tool -change QtCore.framework/Versions/4/QtCore @loader_path/../Frameworks/QtCore $TARGET')
installTargets += env.AddPostAction(xmlpatterns, 'install_name_tool -change QtCore.framework/Versions/4/QtCore @loader_path/../Frameworks/QtCore $TARGET')
installTargets += env.AddPostAction(xmlpatterns, 'install_name_tool -change QtNetwork.framework/Versions/4/QtNetwork @loader_path/../Frameworks/QtNetwork $TARGET')
installTargets += env.AddPostAction(network, 'install_name_tool -change QtCore.framework/Versions/4/QtCore @loader_path/../Frameworks/QtCore $TARGET')
installTargets += env.AddPostAction(gui, 'install_name_tool -change QtCore.framework/Versions/4/QtCore @loader_path/../Frameworks/QtCore $TARGET')
installTargets += env.AddPostAction(opengl, 'install_name_tool -change QtCore.framework/Versions/4/QtCore @loader_path/../Frameworks/QtCore $TARGET')
installTargets += env.AddPostAction(opengl, 'install_name_tool -change QtGui.framework/Versions/4/QtGui @loader_path/../Frameworks/QtGui $TARGET')
installTargets += env.Install(os.path.join(distDir, 'Contents/Resources'), '/Library/Frameworks//QtGui.framework/Versions/4/Resources/qt_menu.nib')
installTargets += env.Install(os.path.join(distDir, 'Contents/Resources/PreviewSettings.nib'), '#data/darwin/PreviewSettings.nib/designable.nib')
installTargets += env.Install(os.path.join(distDir, 'Contents/Resources/PreviewSettings.nib'), '#data/darwin/PreviewSettings.nib/keyedobjects.nib')
installTargets += env.OSXLibInst(frameworkDir, '$QTDIR/frameworks/QtCore.framework/Versions/4/QtCore')
opengl = env.OSXLibInst(frameworkDir, '$QTDIR/frameworks/QtOpenGL.framework/Versions/4/QtOpenGL')
xml = env.OSXLibInst(frameworkDir, '$QTDIR/frameworks/QtXml.framework/Versions/4/QtXml')
xmlpatterns = env.OSXLibInst(frameworkDir, '$QTDIR/frameworks/QtXmlPatterns.framework/Versions/4/QtXmlPatterns')
network = env.OSXLibInst(frameworkDir, '$QTDIR/frameworks/QtNetwork.framework/Versions/4/QtNetwork')
gui = env.OSXLibInst(frameworkDir, '$QTDIR/frameworks/QtGui.framework/Versions/4/QtGui')
installTargets += env.AddPostAction(xml, 'install_name_tool -change QtCore.framework/Versions/4/QtCore @rpath/QtCore $TARGET')
installTargets += env.AddPostAction(xmlpatterns, 'install_name_tool -change QtCore.framework/Versions/4/QtCore @rpath/QtCore $TARGET')
installTargets += env.AddPostAction(xmlpatterns, 'install_name_tool -change QtNetwork.framework/Versions/4/QtNetwork @rpath/QtNetwork $TARGET')
installTargets += env.AddPostAction(network, 'install_name_tool -change QtCore.framework/Versions/4/QtCore @rpath/QtCore $TARGET')
installTargets += env.AddPostAction(gui, 'install_name_tool -change QtCore.framework/Versions/4/QtCore @rpath/QtCore $TARGET')
installTargets += env.AddPostAction(opengl, 'install_name_tool -change QtCore.framework/Versions/4/QtCore @rpath/QtCore $TARGET')
installTargets += env.AddPostAction(opengl, 'install_name_tool -change QtGui.framework/Versions/4/QtGui @rpath/QtGui $TARGET')
installTargets += env.Install(os.path.join(distDir, 'Contents/Resources'), '$QTDIR/frameworks//QtGui.framework/Versions/4/Resources/qt_menu.nib')
installTargets += env.Install(os.path.join(distDir, 'Contents/Resources'), '#data/darwin/PreviewSettings.nib')
installTargets += env.Install(os.path.join(distDir, 'Contents/Resources'), '#data/darwin/qt.conf')
installTargets += env.Install(os.path.join(distDir, 'Contents/Frameworks/BWToolkitFramework.framework/Versions/A'),
'#dependencies/darwin/BWToolkitFramework.framework/Versions/A/BWToolkitFramework')
for file in os.listdir(env.GetBuildPath('#dependencies/darwin/BWToolkitFramework.framework/Versions/A/Resources')):
'#dependencies/frameworks/BWToolkitFramework.framework/Versions/A/BWToolkitFramework')
for file in os.listdir(env.GetBuildPath('#dependencies/frameworks/BWToolkitFramework.framework/Versions/A/Resources')):
if fnmatch.fnmatch(file, '*.pdf') or fnmatch.fnmatch(file, '*.tiff') or fnmatch.fnmatch(file, '*.tif') or fnmatch.fnmatch(file, '*.png') or fnmatch.fnmatch(file, '*.rtf') or fnmatch.fnmatch(file, '*.plist'):
installTargets += env.Install(os.path.join(distDir, 'Contents/Frameworks/BWToolkitFramework.framework/Resources'), '#dependencies/darwin/BWToolkitFramework.framework/Versions/A/Resources/' + file)
installTargets += env.Install(os.path.join(distDir, 'Contents/Frameworks/BWToolkitFramework.framework/Resources'), '#dependencies/frameworks/BWToolkitFramework.framework/Versions/A/Resources/' + file)
if hasBreakpad:
installTargets += env.Install(os.path.join(distDir, 'Contents/Frameworks'), '#dependencies/frameworks/Breakpad.framework')
if dist:
if sys.platform == 'win32':

View File

@ -1,32 +0,0 @@
BUILDDIR = '#build/release'
DISTDIR = '#Mitsuba.app'
CXX = 'g++'
CC = 'gcc'
CXXFLAGS = ['-arch', 'i386', '-arch', 'x86_64', '-mmacosx-version-min=10.6', '-march=nocona', '-msse2', '-mfpmath=sse', '-ftree-vectorize', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fomit-frame-pointer', '-isysroot', '/Developer/SDKs/MacOSX10.6.sdk', '-O3', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fstrict-aliasing', '-fsched-interblock', '-freorder-blocks']
LINKFLAGS = ['-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'i386', '-arch', 'x86_64', '-mmacosx-version-min=10.6', '-Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk', '-Wl,-headerpad,128']
BASEINCLUDE = ['#include']
BASELIB = ['m', 'pthread', 'gomp']
OEXRINCLUDE = ['#dependencies/darwin/OpenEXR.framework/Headers/OpenEXR']
OEXRLIBDIR = ['#dependencies/darwin/OpenEXR.framework/Resources/lib']
OEXRLIB = ['Half', 'IlmImf', 'Imath', 'z']
PNGINCLUDE = ['#dependencies/darwin/libpng.framework/Headers']
PNGLIBDIR = ['#dependencies/darwin/libpng.framework/Resources/lib']
PNGLIB = ['png']
JPEGINCLUDE = ['#dependencies/darwin/libjpeg.framework/Headers']
JPEGLIBDIR = ['#dependencies/darwin/libjpeg.framework/Resources/lib']
JPEGLIB = ['jpeg']
XERCESINCLUDE = ['#dependencies/darwin/Xerces-C.framework/Headers']
XERCESLIBDIR = ['#dependencies/darwin/Xerces-C.framework/Resources/lib']
XERCESLIB = ['xerces-c']
GLINCLUDE = ['#dependencies/darwin/GLEW.framework/Headers']
GLLIBDIR = ['#dependencies/darwin/GLEW.framework/Resources/libs']
GLLIB = ['GLEW', 'objc']
GLFLAGS = ['-DGLEW_MX']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_filesystem', 'boost_system']
BOOSTLIBDIR = ['#dependencies/darwin/libboost.framework/Resources/lib']
PYTHONINCLUDE = ['/System/Library/Frameworks/Python.framework/Versions/2.6/Headers']
PYTHONLIB = ['boost_python', 'boost_system', 'Python']
COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4']
COLLADALIB = ['libCollada14Dom']
COLLADALIBDIR = ['#dependencies/darwin/Collada14Dom.framework/Resources/lib']

View File

@ -1,32 +0,0 @@
BUILDDIR = '#build/release'
DISTDIR = '#Mitsuba.app'
CXX = 'g++'
CC = 'gcc'
CXXFLAGS = ['-arch', 'i386', '-mmacosx-version-min=10.6', '-march=nocona', '-msse2', '-mfpmath=sse', '-ftree-vectorize', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fomit-frame-pointer', '-isysroot', '/Developer/SDKs/MacOSX10.6.sdk', '-O3', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fstrict-aliasing', '-fsched-interblock', '-freorder-blocks']
LINKFLAGS = ['-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'i386', '-mmacosx-version-min=10.6', '-Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk', '-Wl,-headerpad,128']
BASEINCLUDE = ['#include']
BASELIB = ['m', 'pthread', 'gomp']
OEXRINCLUDE = ['#dependencies/darwin/OpenEXR.framework/Headers/OpenEXR']
OEXRLIBDIR = ['#dependencies/darwin/OpenEXR.framework/Resources/lib']
OEXRLIB = ['Half', 'IlmImf', 'Imath', 'z']
PNGINCLUDE = ['#dependencies/darwin/libpng.framework/Headers']
PNGLIBDIR = ['#dependencies/darwin/libpng.framework/Resources/lib']
PNGLIB = ['png']
JPEGINCLUDE = ['#dependencies/darwin/libjpeg.framework/Headers']
JPEGLIBDIR = ['#dependencies/darwin/libjpeg.framework/Resources/lib']
JPEGLIB = ['jpeg']
XERCESINCLUDE = ['#dependencies/darwin/Xerces-C.framework/Headers']
XERCESLIBDIR = ['#dependencies/darwin/Xerces-C.framework/Resources/lib']
XERCESLIB = ['xerces-c']
GLINCLUDE = ['#dependencies/darwin/GLEW.framework/Headers']
GLLIBDIR = ['#dependencies/darwin/GLEW.framework/Resources/libs']
GLLIB = ['GLEW', 'objc']
GLFLAGS = ['-DGLEW_MX']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_filesystem', 'boost_system']
BOOSTLIBDIR = ['#dependencies/darwin/libboost.framework/Resources/lib']
PYTHONINCLUDE = ['/System/Library/Frameworks/Python.framework/Versions/2.6/Headers']
PYTHONLIB = ['boost_python', 'boost_system', 'Python']
COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4']
COLLADALIB = ['libCollada14Dom']
COLLADALIBDIR = ['#dependencies/darwin/Collada14Dom.framework/Resources/lib']

View File

@ -1,32 +0,0 @@
BUILDDIR = '#build/release'
DISTDIR = '#Mitsuba.app'
CXX = 'g++'
CC = 'gcc'
CXXFLAGS = ['-arch', 'x86_64', '-mmacosx-version-min=10.6', '-march=nocona', '-msse2', '-mfpmath=sse', '-ftree-vectorize', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-isysroot', '/Developer/SDKs/MacOSX10.6.sdk', '-O3', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fstrict-aliasing', '-fsched-interblock', '-freorder-blocks']
LINKFLAGS = ['-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'x86_64', '-mmacosx-version-min=10.6', '-Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk', '-Wl,-headerpad,128']
BASEINCLUDE = ['#include']
BASELIB = ['m', 'pthread', 'gomp']
OEXRINCLUDE = ['#dependencies/darwin/OpenEXR.framework/Headers/OpenEXR']
OEXRLIBDIR = ['#dependencies/darwin/OpenEXR.framework/Resources/lib']
OEXRLIB = ['Half', 'IlmImf', 'Imath', 'z']
PNGINCLUDE = ['#dependencies/darwin/libpng.framework/Headers']
PNGLIBDIR = ['#dependencies/darwin/libpng.framework/Resources/lib']
PNGLIB = ['png']
JPEGINCLUDE = ['#dependencies/darwin/libjpeg.framework/Headers']
JPEGLIBDIR = ['#dependencies/darwin/libjpeg.framework/Resources/lib']
JPEGLIB = ['jpeg']
XERCESINCLUDE = ['#dependencies/darwin/Xerces-C.framework/Headers']
XERCESLIBDIR = ['#dependencies/darwin/Xerces-C.framework/Resources/lib']
XERCESLIB = ['xerces-c']
GLINCLUDE = ['#dependencies/darwin/GLEW.framework/Headers']
GLLIBDIR = ['#dependencies/darwin/GLEW.framework/Resources/libs']
GLLIB = ['GLEW', 'objc']
GLFLAGS = ['-DGLEW_MX']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_filesystem', 'boost_system']
BOOSTLIBDIR = ['#dependencies/darwin/libboost.framework/Resources/lib']
PYTHONINCLUDE = ['/System/Library/Frameworks/Python.framework/Versions/2.6/Headers']
PYTHONLIB = ['boost_python', 'boost_system', 'Python']
COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4']
COLLADALIB = ['libCollada14Dom']
COLLADALIBDIR = ['#dependencies/darwin/Collada14Dom.framework/Resources/lib']

View File

@ -1,33 +0,0 @@
BUILDDIR = '#build/release'
DISTDIR = '#Mitsuba.app'
CXX = 'icpc'
CC = 'icc'
CCFLAGS = ['-arch', 'i386', '-mmacosx-version-min=10.6', '-mfpmath=sse', '-isysroot', '/Developer/SDKs/MacOSX10.6.sdk', '-O3', '-ipo', '-no-prec-div', '-xSSSE3', '-fp-model', 'fast=2', '-openmp', '-wd279', '-Wall', '-g', '-pipe']
CXXFLAGS = ['$CCFLAGS', '-std=c++0x', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT']
LINKFLAGS = ['-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'i386', '-mmacosx-version-min=10.6', '-Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk', '-openmp', '-Wl,-headerpad,128']
BASEINCLUDE = ['#include']
BASELIB = ['m', 'pthread', 'gomp']
OEXRINCLUDE = ['#dependencies/darwin/OpenEXR.framework/Headers/OpenEXR']
OEXRLIBDIR = ['#dependencies/darwin/OpenEXR.framework/Resources/lib']
OEXRLIB = ['Half', 'IlmImf', 'Imath', 'z']
PNGINCLUDE = ['#dependencies/darwin/libpng.framework/Headers']
PNGLIBDIR = ['#dependencies/darwin/libpng.framework/Resources/lib']
PNGLIB = ['png']
JPEGINCLUDE = ['#dependencies/darwin/libjpeg.framework/Headers']
JPEGLIBDIR = ['#dependencies/darwin/libjpeg.framework/Resources/lib']
JPEGLIB = ['jpeg']
XERCESINCLUDE = ['#dependencies/darwin/Xerces-C.framework/Headers']
XERCESLIBDIR = ['#dependencies/darwin/Xerces-C.framework/Resources/lib']
XERCESLIB = ['xerces-c']
GLINCLUDE = ['#dependencies/darwin/GLEW.framework/Headers']
GLLIBDIR = ['#dependencies/darwin/GLEW.framework/Resources/libs']
GLLIB = ['GLEW', 'objc']
GLFLAGS = ['-DGLEW_MX']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_filesystem', 'boost_system']
BOOSTLIBDIR = ['#dependencies/darwin/libboost.framework/Resources/lib']
PYTHONINCLUDE = ['/System/Library/Frameworks/Python.framework/Versions/2.6/Headers']
PYTHONLIB = ['boost_python', 'boost_system', 'Python']
COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4']
COLLADALIB = ['libCollada14Dom']
COLLADALIBDIR = ['#dependencies/darwin/Collada14Dom.framework/Resources/lib']

View File

@ -1,33 +0,0 @@
BUILDDIR = '#build/release'
DISTDIR = '#Mitsuba.app'
CXX = 'icpc'
CC = 'icc'
CCFLAGS = ['-arch', 'x86_64', '-mmacosx-version-min=10.6', '-mfpmath=sse', '-isysroot', '/Developer/SDKs/MacOSX10.6.sdk', '-O3', '-ipo', '-xSSSE3', '-fp-model', 'fast=2', '-openmp', '-wd279', '-Wall', '-g', '-pipe']
CXXFLAGS = ['$CCFLAGS', '-std=c++0x', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT']
LINKFLAGS = ['-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'x86_64', '-mmacosx-version-min=10.6', '-Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk', '-openmp', '-Wl,-headerpad,128']
BASEINCLUDE = ['#include']
BASELIB = ['m', 'pthread', 'gomp']
OEXRINCLUDE = ['#dependencies/darwin/OpenEXR.framework/Headers/OpenEXR']
OEXRLIBDIR = ['#dependencies/darwin/OpenEXR.framework/Resources/lib']
OEXRLIB = ['Half', 'IlmImf', 'Imath', 'z']
PNGINCLUDE = ['#dependencies/darwin/libpng.framework/Headers']
PNGLIBDIR = ['#dependencies/darwin/libpng.framework/Resources/lib']
PNGLIB = ['png']
JPEGINCLUDE = ['#dependencies/darwin/libjpeg.framework/Headers']
JPEGLIBDIR = ['#dependencies/darwin/libjpeg.framework/Resources/lib']
JPEGLIB = ['jpeg']
XERCESINCLUDE = ['#dependencies/darwin/Xerces-C.framework/Headers']
XERCESLIBDIR = ['#dependencies/darwin/Xerces-C.framework/Resources/lib']
XERCESLIB = ['xerces-c']
GLINCLUDE = ['#dependencies/darwin/GLEW.framework/Headers']
GLLIBDIR = ['#dependencies/darwin/GLEW.framework/Resources/libs']
GLLIB = ['GLEW', 'objc']
GLFLAGS = ['-DGLEW_MX']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_filesystem', 'boost_system']
BOOSTLIBDIR = ['#dependencies/darwin/libboost.framework/Resources/lib']
PYTHONINCLUDE = ['/System/Library/Frameworks/Python.framework/Versions/2.6/Headers']
PYTHONLIB = ['boost_python', 'boost_system', 'Python']
COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4']
COLLADALIB = ['libCollada14Dom']
COLLADALIBDIR = ['#dependencies/darwin/Collada14Dom.framework/Resources/lib']

View File

@ -1,35 +0,0 @@
import sys, os
BUILDDIR = '#build/release'
DISTDIR = '#dist'
CXX = 'icl'
CC = 'icl'
LINK = 'xilink'
CXXFLAGS = ['/nologo', '/O3', '/Qipo', '/QxSSE2', '/QaxSSE3,SSE4.2', '/fp:fast=2', '/D', 'WIN32', '/W3', '/Qdiag-disable:2586', '/EHsc', '/GS-', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'SPECTRUM_SAMPLES=3', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/Qopenmp']
SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86'
MSVC_VERSION = '10.0'
INTEL_COMPILER = True
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X86', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/NODEFAULTLIB:LIBCMT', '/MANIFEST', '/Qdiag-disable:11024']
BASEINCLUDE = ['#include', '#dependencies/windows/include']
BASELIB = ['pthreadVCE2', 'msvcrt', 'ws2_32']
OEXRINCLUDE = ['#dependencies/windows/include/OpenEXR']
OEXRFLAGS = ['/D', 'OPENEXR_DLL']
OEXRLIB = ['IlmImf', 'IlmThread', 'zlib1', 'Half']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_system-vc100-mt-1_44', 'boost_filesystem-vc100-mt-1_44']
COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4']
COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng13']
JPEGLIB = ['jpeg62']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX']
BASELIBDIR = ['#dependencies/windows/lib32', '#dependencies/windows/lib32/vc100']
PYTHONINCLUDE = [os.path.join(os.path.split(sys.executable)[0], 'include')]
PYTHONLIBDIR = [os.path.join(os.path.split(sys.executable)[0], 'libs')]
PYTHONLIB = ['boost_python-vc100-mt-1_44', 'python26']
SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll'
LIBSUFFIX = '.lib'
PROGSUFFIX = '.exe'

View File

@ -1,35 +0,0 @@
import sys, os
BUILDDIR = '#build/release'
DISTDIR = '#dist'
CXX = 'icl'
CC = 'icl'
LINK = 'xilink'
CXXFLAGS = ['/nologo', '/O3', '/Qipo', '/QxSSE2', '/QaxSSE3,SSE4.2', '/fp:fast=2', '/D', 'WIN32', '/D', 'WIN64', '/W3', '/Qdiag-disable:2586', '/EHsc', '/GS-', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'SPECTRUM_SAMPLES=3', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/Qopenmp']
SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86_64'
MSVC_VERSION = '10.0'
INTEL_COMPILER = True
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X64', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/NODEFAULTLIB:LIBCMT', '/MANIFEST', '/Qdiag-disable:11024']
BASEINCLUDE = ['#include', '#dependencies/windows/include']
BASELIB = ['pthreadVCE2', 'msvcrt', 'ws2_32']
OEXRINCLUDE = ['#dependencies/windows/include/OpenEXR']
OEXRFLAGS = ['/D', 'OPENEXR_DLL']
OEXRLIB = ['IlmImf', 'IlmThread', 'zlib1', 'Half']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_system-vc100-mt-1_44', 'boost_filesystem-vc100-mt-1_44']
COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4']
COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng13']
JPEGLIB = ['jpeg62']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX']
BASELIBDIR = ['#dependencies/windows/lib64', '#dependencies/windows/lib64/vc100']
PYTHONINCLUDE = [os.path.join(os.path.split(sys.executable)[0], 'include')]
PYTHONLIBDIR = [os.path.join(os.path.split(sys.executable)[0], 'libs')]
PYTHONLIB = ['boost_python-vc100-mt-1_44', 'python26']
SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll'
LIBSUFFIX = '.lib'
PROGSUFFIX = '.exe'

View File

@ -1,30 +0,0 @@
import os
BUILDDIR = '#build/debug'
DISTDIR = '#dist'
CXX = 'g++'
CC = 'gcc'
CXXFLAGS = ['-O0', '-Wall', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fomit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp']
LINKFLAGS = []
SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC', '-lstdc++']
BASEINCLUDE = ['#include']
BASELIB = ['dl', 'm', 'pthread', 'gomp']
OEXRINCLUDE = ['/usr/include/OpenEXR']
OEXRLIB = ['Half', 'IlmImf', 'z']
PNGLIB = ['png']
JPEGLIB = ['jpeg']
XERCESINCLUDE = []
XERCESLIB = ['xerces-c']
GLLIB = ['GL', 'GLU', 'GLEWmx', 'Xxf86vm', 'X11']
GLFLAGS = ['-DGLEW_MX']
BOOSTLIB = ['boost_system', 'boost_filesystem']
COLLADAINCLUDE = ['/usr/include/collada-dom', '/usr/include/collada-dom/1.4']
COLLADALIB = ['collada14dom']
PYTHONINCLUDE = []
PYTHONLIB = ['boost_python']
for entry in os.popen("python-config --cflags --libs").read().split():
if entry[:2] == '-I':
PYTHONINCLUDE += [entry[2:]]
if entry[:2] == '-l':
PYTHONLIB += [entry[2:]]

View File

@ -0,0 +1,41 @@
import os, sys
BUILDDIR = '#build/debug'
DISTDIR = '#dist'
CXX = 'g++'
CC = 'gcc'
CXXFLAGS = ['-O0', '-Wall', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fno-omit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fvisibility=hidden']
LINKFLAGS = []
SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC', '-lstdc++']
BASEINCLUDE = ['#include']
BASELIB = ['dl', 'm', 'pthread', 'gomp']
EIGENINCLUDE = ['/usr/include/eigen3']
OEXRINCLUDE = ['/usr/include/OpenEXR']
OEXRLIB = ['Half', 'IlmImf', 'z']
PNGLIB = ['png']
JPEGLIB = ['jpeg']
XERCESINCLUDE = []
XERCESLIB = ['xerces-c']
GLLIB = ['GL', 'GLU', 'GLEWmx', 'Xxf86vm', 'X11']
GLFLAGS = ['-DGLEW_MX']
BOOSTLIB = ['boost_system', 'boost_filesystem', 'boost_thread']
COLLADAINCLUDE = ['/usr/include/collada-dom', '/usr/include/collada-dom/1.4']
COLLADALIB = ['collada14dom']
# The following assumes that the Mitsuba bindings should be built for the
# "default" Python version. It is also possible to build bindings for multiple
# versions at the same time by explicitly specifying e.g. PYTHON27INCLUDE,
# PYTHON27LIB, PYTHON27LIBDIR and PYTHON32INCLUDE, PYTHON32LIB, PYTHON32LIBDIR
pyver = os.popen("python --version 2>&1 | grep -oE '([[:digit:]].[[:digit:]])'").read().strip().replace('.', '')
env = locals()
env['PYTHON'+pyver+'INCLUDE'] = []
env['PYTHON'+pyver+'LIB'] = ['boost_python3' if pyver[0] == '3' else 'boost_python']
for entry in os.popen("python-config --cflags --libs").read().split():
if entry[:2] == '-I':
env['PYTHON'+pyver+'INCLUDE'] += [entry[2:]]
if entry[:2] == '-l':
env['PYTHON'+pyver+'LIB'] += [entry[2:]]

40
build/config-linux-gcc.py Normal file
View File

@ -0,0 +1,40 @@
import os, sys
BUILDDIR = '#build/release'
DISTDIR = '#dist'
CXX = 'g++'
CC = 'gcc'
CXXFLAGS = ['-O3', '-Wall', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fomit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp', '-fvisibility=hidden']
LINKFLAGS = []
SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC', '-lstdc++']
BASEINCLUDE = ['#include']
BASELIB = ['dl', 'm', 'pthread', 'gomp']
EIGENINCLUDE = ['/usr/include/eigen3']
OEXRINCLUDE = ['/usr/include/OpenEXR']
OEXRLIB = ['Half', 'IlmImf', 'z']
PNGLIB = ['png']
JPEGLIB = ['jpeg']
XERCESINCLUDE = []
XERCESLIB = ['xerces-c']
GLLIB = ['GL', 'GLU', 'GLEWmx', 'Xxf86vm', 'X11']
GLFLAGS = ['-DGLEW_MX']
BOOSTLIB = ['boost_system', 'boost_filesystem', 'boost_thread']
COLLADAINCLUDE = ['/usr/include/collada-dom', '/usr/include/collada-dom/1.4']
COLLADALIB = ['collada14dom']
# The following assumes that the Mitsuba bindings should be built for the
# "default" Python version. It is also possible to build bindings for multiple
# versions at the same time by explicitly specifying e.g. PYTHON27INCLUDE,
# PYTHON27LIB, PYTHON27LIBDIR and PYTHON32INCLUDE, PYTHON32LIB, PYTHON32LIBDIR
pyver = os.popen("python --version 2>&1 | grep -oE '([[:digit:]].[[:digit:]])'").read().strip().replace('.', '')
env = locals()
env['PYTHON'+pyver+'INCLUDE'] = []
env['PYTHON'+pyver+'LIB'] = ['boost_python3' if pyver[0] == '3' else 'boost_python']
for entry in os.popen("python-config --cflags --libs").read().split():
if entry[:2] == '-I':
env['PYTHON'+pyver+'INCLUDE'] += [entry[2:]]
if entry[:2] == '-l':
env['PYTHON'+pyver+'LIB'] += [entry[2:]]

View File

@ -1,30 +0,0 @@
import os
BUILDDIR = '#build/release'
DISTDIR = '#dist'
CXX = 'g++'
CC = 'gcc'
CXXFLAGS = ['-O3', '-Wall', '-g', '-pipe', '-march=nocona', '-msse2', '-ftree-vectorize', '-mfpmath=sse', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fomit-frame-pointer', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fopenmp']
LINKFLAGS = []
SHLINKFLAGS = ['-rdynamic', '-shared', '-fPIC', '-lstdc++']
BASEINCLUDE = ['#include']
BASELIB = ['dl', 'm', 'pthread', 'gomp']
OEXRINCLUDE = ['/usr/include/OpenEXR']
OEXRLIB = ['Half', 'IlmImf', 'z']
PNGLIB = ['png']
JPEGLIB = ['jpeg']
XERCESINCLUDE = []
XERCESLIB = ['xerces-c']
GLLIB = ['GL', 'GLU', 'GLEWmx', 'Xxf86vm', 'X11']
GLFLAGS = ['-DGLEW_MX']
BOOSTLIB = ['boost_system', 'boost_filesystem']
COLLADAINCLUDE = ['/usr/include/collada-dom', '/usr/include/collada-dom/1.4']
COLLADALIB = ['collada14dom']
PYTHONINCLUDE = []
PYTHONLIB = ['boost_python']
for entry in os.popen("python-config --cflags --libs").read().split():
if entry[:2] == '-I':
PYTHONINCLUDE += [entry[2:]]
if entry[:2] == '-l':
PYTHONLIB += [entry[2:]]

View File

@ -0,0 +1,27 @@
BUILDDIR = '#build/release'
DISTDIR = '#Mitsuba.app'
CXX = 'g++'
CC = 'gcc'
CCFLAGS = ['-arch', 'i386', '-arch', 'x86_64', '-mmacosx-version-min=10.6', '-march=nocona', '-msse2', '-mfpmath=sse', '-ftree-vectorize', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fomit-frame-pointer', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk', '-O3', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fstrict-aliasing', '-fsched-interblock', '-freorder-blocks', '-fvisibility=hidden']
LINKFLAGS = ['-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'i386', '-arch', 'x86_64', '-mmacosx-version-min=10.6', '-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk', '-Wl,-headerpad,128']
BASEINCLUDE = ['#include', '#dependencies/include']
BASELIBDIR = ['#dependencies/lib']
BASELIB = ['m', 'pthread', 'Half']
OEXRINCLUDE = ['#dependencies/include/OpenEXR']
OEXRLIB = ['IlmImf', 'Imath', 'Iex', 'z']
PNGLIB = ['png']
JPEGLIB = ['jpeg']
XERCESLIB = ['xerces-c']
GLLIB = ['GLEWmx', 'objc']
GLFLAGS = ['-DGLEW_MX']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_filesystem', 'boost_system', 'boost_thread']
PYTHON26INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.6/Headers']
PYTHON26LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.6/lib']
PYTHON26LIB = ['boost_python26', 'boost_system', 'python2.6']
PYTHON27INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.7/Headers']
PYTHON27LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.7/lib']
PYTHON27LIB = ['boost_python27', 'boost_system', 'python2.7']
COLLADAINCLUDE = ['#dependencies/include/collada-dom', '#dependencies/include/collada-dom/1.4']
COLLADALIB = ['collada14dom23']
QTDIR = '#dependencies'

View File

@ -0,0 +1,27 @@
BUILDDIR = '#build/release'
DISTDIR = '#Mitsuba.app'
CXX = 'g++'
CC = 'gcc'
CCFLAGS = ['-arch', 'i386', '-mmacosx-version-min=10.6', '-march=nocona', '-msse2', '-mfpmath=sse', '-ftree-vectorize', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fomit-frame-pointer', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk', '-O3', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fstrict-aliasing', '-fsched-interblock', '-freorder-blocks', '-fvisibility=hidden']
LINKFLAGS = ['-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'i386', '-mmacosx-version-min=10.6', '-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk', '-Wl,-headerpad,128']
BASEINCLUDE = ['#include', '#dependencies/include']
BASELIBDIR = ['#dependencies/lib']
BASELIB = ['m', 'pthread', 'Half']
OEXRINCLUDE = ['#dependencies/include/OpenEXR']
OEXRLIB = ['IlmImf', 'Imath', 'Iex', 'z']
PNGLIB = ['png']
JPEGLIB = ['jpeg']
XERCESLIB = ['xerces-c']
GLLIB = ['GLEWmx', 'objc']
GLFLAGS = ['-DGLEW_MX']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_filesystem', 'boost_system', 'boost_thread']
PYTHON26INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.6/Headers']
PYTHON26LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.6/lib']
PYTHON26LIB = ['boost_python26', 'boost_system', 'python2.6']
PYTHON27INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.7/Headers']
PYTHON27LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.7/lib']
PYTHON27LIB = ['boost_python27', 'boost_system', 'python2.7']
COLLADAINCLUDE = ['#dependencies/include/collada-dom', '#dependencies/include/collada-dom/1.4']
COLLADALIB = ['collada14dom23']
QTDIR = '#dependencies'

View File

@ -0,0 +1,27 @@
BUILDDIR = '#build/release'
DISTDIR = '#Mitsuba.app'
CXX = 'g++'
CC = 'gcc'
CCFLAGS = ['-arch', 'x86_64', '-mmacosx-version-min=10.6', '-march=nocona', '-msse2', '-mfpmath=sse', '-ftree-vectorize', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk', '-O3', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fstrict-aliasing', '-fsched-interblock', '-freorder-blocks', '-fvisibility=hidden']
LINKFLAGS = ['-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'x86_64', '-mmacosx-version-min=10.6', '-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk', '-Wl,-headerpad,128']
BASEINCLUDE = ['#include', '#dependencies/include']
BASELIBDIR = ['#dependencies/lib']
BASELIB = ['m', 'pthread', 'Half']
OEXRINCLUDE = ['#dependencies/include/OpenEXR']
OEXRLIB = ['IlmImf', 'Imath', 'Iex', 'z']
PNGLIB = ['png']
JPEGLIB = ['jpeg']
XERCESLIB = ['xerces-c']
GLLIB = ['GLEWmx', 'objc']
GLFLAGS = ['-DGLEW_MX']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_filesystem', 'boost_system', 'boost_thread']
PYTHON26INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.6/Headers']
PYTHON26LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.6/lib']
PYTHON26LIB = ['boost_python26', 'boost_system', 'python2.6']
PYTHON27INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.7/Headers']
PYTHON27LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.7/lib']
PYTHON27LIB = ['boost_python27', 'boost_system', 'python2.7']
COLLADAINCLUDE = ['#dependencies/include/collada-dom', '#dependencies/include/collada-dom/1.4']
COLLADALIB = ['collada14dom23']
QTDIR = '#dependencies'

View File

@ -0,0 +1,28 @@
BUILDDIR = '#build/release'
DISTDIR = '#Mitsuba.app'
CXX = 'icpc'
CC = 'icc'
CCFLAGS = ['-arch', 'i386', '-mmacosx-version-min=10.6', '-mfpmath=sse', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk', '-O3', '-ipo', '-no-prec-div', '-xSSE3', '-fp-model', 'fast=2', '-openmp', '-wd279', '-wd1875', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fvisibility=hidden']
CXXFLAGS = ['-std=c++0x']
LINKFLAGS = ['-g', '-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'i386', '-mmacosx-version-min=10.6', '-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk', '-openmp', '-Wl,-headerpad,128', '-wd11012']
BASEINCLUDE = ['#include', '#dependencies/include']
BASELIBDIR = ['#dependencies/lib']
BASELIB = ['m', 'pthread', 'gomp', 'Half']
OEXRINCLUDE = ['#dependencies/include/OpenEXR']
OEXRLIB = ['IlmImf', 'Imath', 'Iex', 'z']
PNGLIB = ['png']
JPEGLIB = ['jpeg']
XERCESLIB = ['xerces-c']
GLLIB = ['GLEWmx', 'objc']
GLFLAGS = ['-DGLEW_MX']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_filesystem', 'boost_system', 'boost_thread']
PYTHON26INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.6/Headers']
PYTHON26LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.6/lib']
PYTHON26LIB = ['boost_python26', 'boost_system', 'python2.6']
PYTHON27INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.7/Headers']
PYTHON27LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.7/lib']
PYTHON27LIB = ['boost_python27', 'boost_system', 'python2.7']
COLLADAINCLUDE = ['#dependencies/include/collada-dom', '#dependencies/include/collada-dom/1.4']
COLLADALIB = ['collada14dom23']
QTDIR = '#dependencies'

View File

@ -0,0 +1,28 @@
BUILDDIR = '#build/release'
DISTDIR = '#Mitsuba.app'
CXX = 'icpc'
CC = 'icc'
CCFLAGS = ['-arch', 'x86_64', '-mmacosx-version-min=10.6', '-mfpmath=sse', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk', '-O3', '-ipo', '-xSSSE3', '-fp-model', 'fast=2', '-openmp', '-wd279', '-wd1875', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fvisibility=hidden']
CXXFLAGS = ['-std=c++0x']
LINKFLAGS = ['-g', '-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'x86_64', '-mmacosx-version-min=10.6', '-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk', '-openmp', '-Wl,-headerpad,128', '-wd11012']
BASEINCLUDE = ['#include', '#dependencies/include']
BASELIBDIR = ['#dependencies/lib']
BASELIB = ['m', 'pthread', 'gomp', 'Half']
OEXRINCLUDE = ['#dependencies/include/OpenEXR']
OEXRLIB = ['IlmImf', 'Imath', 'Iex', 'z']
PNGLIB = ['png']
JPEGLIB = ['jpeg']
XERCESLIB = ['xerces-c']
GLLIB = ['GLEWmx', 'objc']
GLFLAGS = ['-DGLEW_MX']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_filesystem', 'boost_system', 'boost_thread']
PYTHON26INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.6/Headers']
PYTHON26LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.6/lib']
PYTHON26LIB = ['boost_python26', 'boost_system', 'python2.6']
PYTHON27INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.7/Headers']
PYTHON27LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.7/lib']
PYTHON27LIB = ['boost_python27', 'boost_system', 'python2.7']
COLLADAINCLUDE = ['#dependencies/include/collada-dom', '#dependencies/include/collada-dom/1.4']
COLLADALIB = ['collada14dom23']
QTDIR = '#dependencies'

View File

@ -0,0 +1,27 @@
BUILDDIR = '#build/release'
DISTDIR = '#Mitsuba.app'
CXX = 'g++'
CC = 'gcc'
CCFLAGS = ['-arch', 'i386', '-arch', 'x86_64', '-mmacosx-version-min=10.7', '-march=nocona', '-msse2', '-mfpmath=sse', '-ftree-vectorize', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fomit-frame-pointer', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk', '-O3', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fstrict-aliasing', '-fsched-interblock', '-freorder-blocks', '-fvisibility=hidden']
LINKFLAGS = ['-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'i386', '-arch', 'x86_64', '-mmacosx-version-min=10.7', '-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk', '-Wl,-headerpad,128']
BASEINCLUDE = ['#include', '#dependencies/include']
BASELIBDIR = ['#dependencies/lib']
BASELIB = ['m', 'pthread', 'Half']
OEXRINCLUDE = ['#dependencies/include/OpenEXR']
OEXRLIB = ['IlmImf', 'Imath', 'Iex', 'z']
PNGLIB = ['png']
JPEGLIB = ['jpeg']
XERCESLIB = ['xerces-c']
GLLIB = ['GLEWmx', 'objc']
GLFLAGS = ['-DGLEW_MX']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_filesystem', 'boost_system', 'boost_thread']
PYTHON26INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.6/Headers']
PYTHON26LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.6/lib']
PYTHON26LIB = ['boost_python26', 'boost_system', 'python2.6']
PYTHON27INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.7/Headers']
PYTHON27LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.7/lib']
PYTHON27LIB = ['boost_python27', 'boost_system', 'python2.7']
COLLADAINCLUDE = ['#dependencies/include/collada-dom', '#dependencies/include/collada-dom/1.4']
COLLADALIB = ['collada14dom23']
QTDIR = '#dependencies'

View File

@ -0,0 +1,27 @@
BUILDDIR = '#build/release'
DISTDIR = '#Mitsuba.app'
CXX = 'g++'
CC = 'gcc'
CCFLAGS = ['-arch', 'i386', '-mmacosx-version-min=10.7', '-march=nocona', '-msse2', '-mfpmath=sse', '-ftree-vectorize', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-fomit-frame-pointer', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk', '-O3', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fstrict-aliasing', '-fsched-interblock', '-freorder-blocks', '-fvisibility=hidden']
LINKFLAGS = ['-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'i386', '-mmacosx-version-min=10.7', '-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk', '-Wl,-headerpad,128']
BASEINCLUDE = ['#include', '#dependencies/include']
BASELIBDIR = ['#dependencies/lib']
BASELIB = ['m', 'pthread', 'Half']
OEXRINCLUDE = ['#dependencies/include/OpenEXR']
OEXRLIB = ['IlmImf', 'Imath', 'Iex', 'z']
PNGLIB = ['png']
JPEGLIB = ['jpeg']
XERCESLIB = ['xerces-c']
GLLIB = ['GLEWmx', 'objc']
GLFLAGS = ['-DGLEW_MX']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_filesystem', 'boost_system', 'boost_thread']
PYTHON26INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.6/Headers']
PYTHON26LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.6/lib']
PYTHON26LIB = ['boost_python26', 'boost_system', 'python2.6']
PYTHON27INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.7/Headers']
PYTHON27LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.7/lib']
PYTHON27LIB = ['boost_python27', 'boost_system', 'python2.7']
COLLADAINCLUDE = ['#dependencies/include/collada-dom', '#dependencies/include/collada-dom/1.4']
COLLADALIB = ['collada14dom23']
QTDIR = '#dependencies'

View File

@ -0,0 +1,27 @@
BUILDDIR = '#build/release'
DISTDIR = '#Mitsuba.app'
CXX = 'g++'
CC = 'gcc'
CCFLAGS = ['-arch', 'x86_64', '-mmacosx-version-min=10.7', '-march=nocona', '-msse2', '-mfpmath=sse', '-ftree-vectorize', '-funsafe-math-optimizations', '-fno-rounding-math', '-fno-signaling-nans', '-fno-math-errno', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk', '-O3', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fstrict-aliasing', '-fsched-interblock', '-freorder-blocks', '-fvisibility=hidden']
LINKFLAGS = ['-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'x86_64', '-mmacosx-version-min=10.7', '-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk', '-Wl,-headerpad,128']
BASEINCLUDE = ['#include', '#dependencies/include']
BASELIBDIR = ['#dependencies/lib']
BASELIB = ['m', 'pthread', 'gomp', 'Half']
OEXRINCLUDE = ['#dependencies/include/OpenEXR']
OEXRLIB = ['IlmImf', 'Imath', 'Iex', 'z']
PNGLIB = ['png']
JPEGLIB = ['jpeg']
XERCESLIB = ['xerces-c']
GLLIB = ['GLEWmx', 'objc']
GLFLAGS = ['-DGLEW_MX']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_filesystem', 'boost_system', 'boost_thread']
PYTHON26INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.6/Headers']
PYTHON26LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.6/lib']
PYTHON26LIB = ['boost_python26', 'boost_system', 'python2.6']
PYTHON27INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.7/Headers']
PYTHON27LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.7/lib']
PYTHON27LIB = ['boost_python27', 'boost_system', 'python2.7']
COLLADAINCLUDE = ['#dependencies/include/collada-dom', '#dependencies/include/collada-dom/1.4']
COLLADALIB = ['collada14dom23']
QTDIR = '#dependencies'

View File

@ -0,0 +1,28 @@
BUILDDIR = '#build/release'
DISTDIR = '#Mitsuba.app'
CXX = 'icpc'
CC = 'icc'
CCFLAGS = ['-arch', 'i386', '-mmacosx-version-min=10.7', '-mfpmath=sse', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk', '-O3', '-ipo', '-no-prec-div', '-xSSE3', '-fp-model', 'fast=2', '-openmp', '-wd279', '-wd1875', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fvisibility=hidden']
CXXFLAGS = ['-std=c++0x']
LINKFLAGS = ['-g', '-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'i386', '-mmacosx-version-min=10.7', '-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk', '-openmp', '-Wl,-headerpad,128', '-wd11012']
BASEINCLUDE = ['#include', '#dependencies/include']
BASELIBDIR = ['#dependencies/lib']
BASELIB = ['m', 'pthread', 'gomp', 'Half']
OEXRINCLUDE = ['#dependencies/include/OpenEXR']
OEXRLIB = ['IlmImf', 'Imath', 'Iex', 'z']
PNGLIB = ['png']
JPEGLIB = ['jpeg']
XERCESLIB = ['xerces-c']
GLLIB = ['GLEWmx', 'objc']
GLFLAGS = ['-DGLEW_MX']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_filesystem', 'boost_system', 'boost_thread']
PYTHON26INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.6/Headers']
PYTHON26LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.6/lib']
PYTHON26LIB = ['boost_python26', 'boost_system', 'python2.6']
PYTHON27INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.7/Headers']
PYTHON27LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.7/lib']
PYTHON27LIB = ['boost_python27', 'boost_system', 'python2.7']
COLLADAINCLUDE = ['#dependencies/include/collada-dom', '#dependencies/include/collada-dom/1.4']
COLLADALIB = ['collada14dom23']
QTDIR = '#dependencies'

View File

@ -0,0 +1,28 @@
BUILDDIR = '#build/release'
DISTDIR = '#Mitsuba.app'
CXX = 'icpc'
CC = 'icc'
CCFLAGS = ['-arch', 'x86_64', '-mmacosx-version-min=10.7', '-mfpmath=sse', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk', '-O3', '-ipo', '-xSSSE3', '-fp-model', 'fast=2', '-openmp', '-wd279', '-wd1875', '-Wall', '-g', '-pipe', '-DMTS_DEBUG', '-DSINGLE_PRECISION', '-DSPECTRUM_SAMPLES=3', '-DMTS_SSE', '-DMTS_HAS_COHERENT_RT', '-fvisibility=hidden']
CXXFLAGS = ['-std=c++0x']
LINKFLAGS = ['-g', '-framework', 'OpenGL', '-framework', 'Cocoa', '-arch', 'x86_64', '-mmacosx-version-min=10.7', '-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk', '-openmp', '-Wl,-headerpad,128', '-wd11012']
BASEINCLUDE = ['#include', '#dependencies/include']
BASELIBDIR = ['#dependencies/lib']
BASELIB = ['m', 'pthread', 'gomp', 'Half']
OEXRINCLUDE = ['#dependencies/include/OpenEXR']
OEXRLIB = ['IlmImf', 'Imath', 'Iex', 'z']
PNGLIB = ['png']
JPEGLIB = ['jpeg']
XERCESLIB = ['xerces-c']
GLLIB = ['GLEWmx', 'objc']
GLFLAGS = ['-DGLEW_MX']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_filesystem', 'boost_system', 'boost_thread']
PYTHON26INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.6/Headers']
PYTHON26LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.6/lib']
PYTHON26LIB = ['boost_python26', 'boost_system', 'python2.6']
PYTHON27INCLUDE= ['/System/Library/Frameworks/Python.framework/Versions/2.7/Headers']
PYTHON27LIBDIR = ['/System/Library/Frameworks/Python.framework/Versions/2.7/lib']
PYTHON27LIB = ['boost_python27', 'boost_system', 'python2.7']
COLLADAINCLUDE = ['#dependencies/include/collada-dom', '#dependencies/include/collada-dom/1.4']
COLLADALIB = ['collada14dom23']
QTDIR = '#dependencies'

View File

@ -1,36 +0,0 @@
import sys, os
BUILDDIR = '#build/debug'
DISTDIR = '#dist'
CXX = 'cl'
CC = 'cl'
# /O2=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS
CXXFLAGS = ['/nologo', '/Od', '/Z7', '/fp:fast', '/arch:SSE2' ,'/D', 'WIN32', '/W3', '/EHsc', '/GS-', '/GL', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'SPECTRUM_SAMPLES=3', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/openmp']
SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86'
MSVC_VERSION = '9.0'
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/DEBUG', '/MACHINE:X86', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/LTCG', '/NODEFAULTLIB:LIBCMT', '/MANIFEST']
BASEINCLUDE = ['#include', '#dependencies/windows/include']
BASELIB = ['pthreadVCE2', 'msvcrt', 'ws2_32']
OEXRINCLUDE = ['#dependencies/windows/include/OpenEXR']
OEXRFLAGS = ['/D', 'OPENEXR_DLL']
OEXRLIB = ['IlmImf', 'IlmThread', 'zlib1', 'Half']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_system-vc90-mt-1_44', 'boost_filesystem-vc90-mt-1_44']
COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4']
COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng13']
JPEGLIB = ['jpeg62']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX']
BASELIBDIR = ['#dependencies/windows/lib32', '#dependencies/windows/lib32/vc90']
PYTHONINCLUDE = [os.path.join(os.path.split(sys.executable)[0], 'include')]
PYTHONLIBDIR = [os.path.join(os.path.split(sys.executable)[0], 'libs')]
PYTHONLIB = ['boost_python-vc90-mt-1_44', 'python26']
SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll'
LIBSUFFIX = '.lib'
PROGSUFFIX = '.exe'

View File

@ -1,36 +0,0 @@
import sys, os
BUILDDIR = '#build/release'
DISTDIR = '#dist'
CXX = 'cl'
CC = 'cl'
# /O2=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS
CXXFLAGS = ['/nologo', '/O2', '/fp:fast', '/arch:SSE2' ,'/D', 'WIN32', '/W3', '/EHsc', '/GS-', '/GL', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'SPECTRUM_SAMPLES=3', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/openmp']
SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86'
MSVC_VERSION = '9.0'
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X86', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/LTCG', '/NODEFAULTLIB:LIBCMT', '/MANIFEST']
BASEINCLUDE = ['#include', '#dependencies/windows/include']
BASELIB = ['pthreadVCE2', 'msvcrt', 'ws2_32']
OEXRINCLUDE = ['#dependencies/windows/include/OpenEXR']
OEXRFLAGS = ['/D', 'OPENEXR_DLL']
OEXRLIB = ['IlmImf', 'IlmThread', 'zlib1', 'Half']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_system-vc90-mt-1_44', 'boost_filesystem-vc90-mt-1_44']
COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4']
COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng13']
JPEGLIB = ['jpeg62']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX']
BASELIBDIR = ['#dependencies/windows/lib32', '#dependencies/windows/lib32/vc90']
PYTHONINCLUDE = [os.path.join(os.path.split(sys.executable)[0], 'include')]
PYTHONLIBDIR = [os.path.join(os.path.split(sys.executable)[0], 'libs')]
PYTHONLIB = ['boost_python-vc90-mt-1_44', 'python26']
SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll'
LIBSUFFIX = '.lib'
PROGSUFFIX = '.exe'

View File

@ -1,36 +0,0 @@
import sys, os
BUILDDIR = '#build/debug'
DISTDIR = '#dist'
CXX = 'cl'
CC = 'cl'
# /O2=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS
CXXFLAGS = ['/nologo', '/Od', '/Z7', '/fp:fast', '/D', 'WIN32', '/D', 'WIN64', '/W3', '/EHsc', '/GS-', '/GL', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'SPECTRUM_SAMPLES=3', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/openmp']
SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86_64'
MSVC_VERSION = '9.0'
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/DEBUG', '/MACHINE:X64', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/LTCG', '/NODEFAULTLIB:LIBCMT', '/MANIFEST']
BASEINCLUDE = ['#include', '#dependencies/windows/include']
BASELIB = ['pthreadVCE2', 'msvcrt', 'ws2_32']
OEXRINCLUDE = ['#dependencies/windows/include/OpenEXR']
OEXRFLAGS = ['/D', 'OPENEXR_DLL']
OEXRLIB = ['IlmImf', 'IlmThread', 'zlib1', 'Half']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_system-vc90-mt-1_44', 'boost_filesystem-vc90-mt-1_44']
COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4']
COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng13']
JPEGLIB = ['jpeg62']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX']
BASELIBDIR = ['#dependencies/windows/lib64', '#dependencies/windows/lib64/vc90']
PYTHONINCLUDE = [os.path.join(os.path.split(sys.executable)[0], 'include')]
PYTHONLIBDIR = [os.path.join(os.path.split(sys.executable)[0], 'libs')]
PYTHONLIB = ['boost_python-vc90-mt-1_44', 'python26']
SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll'
LIBSUFFIX = '.lib'
PROGSUFFIX = '.exe'

View File

@ -1,36 +0,0 @@
import sys, os
BUILDDIR = '#build/release'
DISTDIR = '#dist'
CXX = 'cl'
CC = 'cl'
# /O2=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS
CXXFLAGS = ['/nologo', '/O2', '/fp:fast', '/D', 'WIN32', '/D', 'WIN64', '/W3', '/EHsc', '/GS-', '/GL', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'SPECTRUM_SAMPLES=3', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/openmp']
SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86_64'
MSVC_VERSION = '9.0'
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X64', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/LTCG', '/NODEFAULTLIB:LIBCMT', '/MANIFEST']
BASEINCLUDE = ['#include', '#dependencies/windows/include']
BASELIB = ['pthreadVCE2', 'msvcrt', 'ws2_32']
OEXRINCLUDE = ['#dependencies/windows/include/OpenEXR']
OEXRFLAGS = ['/D', 'OPENEXR_DLL']
OEXRLIB = ['IlmImf', 'IlmThread', 'zlib1', 'Half']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_system-vc90-mt-1_44', 'boost_filesystem-vc90-mt-1_44']
COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4']
COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng13']
JPEGLIB = ['jpeg62']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX']
BASELIBDIR = ['#dependencies/windows/lib64', '#dependencies/windows/lib64/vc90']
PYTHONINCLUDE = [os.path.join(os.path.split(sys.executable)[0], 'include')]
PYTHONLIBDIR = [os.path.join(os.path.split(sys.executable)[0], 'libs')]
PYTHONLIB = ['boost_python-vc90-mt-1_44', 'python26']
SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll'
LIBSUFFIX = '.lib'
PROGSUFFIX = '.exe'

View File

@ -1,36 +0,0 @@
import sys, os
BUILDDIR = '#build/debug'
DISTDIR = '#dist'
CXX = 'cl'
CC = 'cl'
# /O2=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS
CXXFLAGS = ['/nologo', '/Od', '/Z7', '/fp:fast', '/arch:SSE2' ,'/D', 'WIN32', '/W3', '/EHsc', '/GS-', '/GL', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'SPECTRUM_SAMPLES=3', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/openmp']
SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86'
MSVC_VERSION = '10.0'
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/DEBUG', '/MACHINE:X86', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/LTCG', '/NODEFAULTLIB:LIBCMT', '/MANIFEST']
BASEINCLUDE = ['#include', '#dependencies/windows/include']
BASELIB = ['pthreadVCE2', 'msvcrt', 'ws2_32']
OEXRINCLUDE = ['#dependencies/windows/include/OpenEXR']
OEXRFLAGS = ['/D', 'OPENEXR_DLL']
OEXRLIB = ['IlmImf', 'IlmThread', 'zlib1', 'Half']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_system-vc100-mt-1_44', 'boost_filesystem-vc100-mt-1_44']
COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4']
COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng13']
JPEGLIB = ['jpeg62']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX']
BASELIBDIR = ['#dependencies/windows/lib32', '#dependencies/windows/lib32/vc100']
PYTHONINCLUDE = [os.path.join(os.path.split(sys.executable)[0], 'include')]
PYTHONLIBDIR = [os.path.join(os.path.split(sys.executable)[0], 'libs')]
PYTHONLIB = ['boost_python-vc100-mt-1_44', 'python26']
SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll'
LIBSUFFIX = '.lib'
PROGSUFFIX = '.exe'

View File

@ -1,36 +0,0 @@
import sys, os
BUILDDIR = '#build/release'
DISTDIR = '#dist'
CXX = 'cl'
CC = 'cl'
# /O2=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS
CXXFLAGS = ['/nologo', '/O2', '/fp:fast', '/arch:SSE2' ,'/D', 'WIN32', '/W3', '/EHsc', '/GS-', '/GL', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'SPECTRUM_SAMPLES=3', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/openmp']
SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86'
MSVC_VERSION = '10.0'
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X86', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/LTCG', '/NODEFAULTLIB:LIBCMT', '/MANIFEST']
BASEINCLUDE = ['#include', '#dependencies/windows/include']
BASELIB = ['pthreadVCE2', 'msvcrt', 'ws2_32']
OEXRINCLUDE = ['#dependencies/windows/include/OpenEXR']
OEXRFLAGS = ['/D', 'OPENEXR_DLL']
OEXRLIB = ['IlmImf', 'IlmThread', 'zlib1', 'Half']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_system-vc100-mt-1_44', 'boost_filesystem-vc100-mt-1_44']
COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4']
COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng13']
JPEGLIB = ['jpeg62']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX']
BASELIBDIR = ['#dependencies/windows/lib32', '#dependencies/windows/lib32/vc100']
PYTHONINCLUDE = [os.path.join(os.path.split(sys.executable)[0], 'include')]
PYTHONLIBDIR = [os.path.join(os.path.split(sys.executable)[0], 'libs')]
PYTHONLIB = ['boost_python-vc100-mt-1_44', 'python26']
SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll'
LIBSUFFIX = '.lib'
PROGSUFFIX = '.exe'

View File

@ -1,36 +0,0 @@
import sys, os
BUILDDIR = '#build/debug'
DISTDIR = '#dist'
CXX = 'cl'
CC = 'cl'
# /O2=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS
CXXFLAGS = ['/nologo', '/Od', '/Z7', '/fp:fast', '/D', 'WIN32', '/D', 'WIN64', '/W3', '/EHsc', '/GS-', '/GL', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'SPECTRUM_SAMPLES=3', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/openmp']
SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86_64'
MSVC_VERSION = '10.0'
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/DEBUG', '/MACHINE:X64', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/LTCG', '/NODEFAULTLIB:LIBCMT', '/MANIFEST']
BASEINCLUDE = ['#include', '#dependencies/windows/include']
BASELIB = ['pthreadVCE2', 'msvcrt', 'ws2_32']
OEXRINCLUDE = ['#dependencies/windows/include/OpenEXR']
OEXRFLAGS = ['/D', 'OPENEXR_DLL']
OEXRLIB = ['IlmImf', 'IlmThread', 'zlib1', 'Half']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_system-vc100-mt-1_44', 'boost_filesystem-vc100-mt-1_44']
COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4']
COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng13']
JPEGLIB = ['jpeg62']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX']
BASELIBDIR = ['#dependencies/windows/lib64', '#dependencies/windows/lib64/vc100']
PYTHONINCLUDE = [os.path.join(os.path.split(sys.executable)[0], 'include')]
PYTHONLIBDIR = [os.path.join(os.path.split(sys.executable)[0], 'libs')]
PYTHONLIB = ['boost_python-vc100-mt-1_44', 'python26']
SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll'
LIBSUFFIX = '.lib'
PROGSUFFIX = '.exe'

View File

@ -1,36 +0,0 @@
import sys, os
BUILDDIR = '#build/release'
DISTDIR = '#dist'
CXX = 'cl'
CC = 'cl'
# /O2=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS
CXXFLAGS = ['/nologo', '/O2', '/fp:fast', '/D', 'WIN32', '/D', 'WIN64', '/W3', '/EHsc', '/GS-', '/GL', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'SPECTRUM_SAMPLES=3', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/openmp']
SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86_64'
MSVC_VERSION = '10.0'
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X64', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/LTCG', '/NODEFAULTLIB:LIBCMT', '/MANIFEST']
BASEINCLUDE = ['#include', '#dependencies/windows/include']
BASELIB = ['pthreadVCE2', 'msvcrt', 'ws2_32']
OEXRINCLUDE = ['#dependencies/windows/include/OpenEXR']
OEXRFLAGS = ['/D', 'OPENEXR_DLL']
OEXRLIB = ['IlmImf', 'IlmThread', 'zlib1', 'Half']
BOOSTINCLUDE = ['#dependencies']
BOOSTLIB = ['boost_system-vc100-mt-1_44', 'boost_filesystem-vc100-mt-1_44']
COLLADAINCLUDE = ['#dependencies/windows/include/colladadom', '#dependencies/windows/include/colladadom/1.4']
COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng13']
JPEGLIB = ['jpeg62']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX']
BASELIBDIR = ['#dependencies/windows/lib64', '#dependencies/windows/lib64/vc100']
PYTHONINCLUDE = [os.path.join(os.path.split(sys.executable)[0], 'include')]
PYTHONLIBDIR = [os.path.join(os.path.split(sys.executable)[0], 'libs')]
PYTHONLIB = ['boost_python-vc100-mt-1_44', 'python26']
SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll'
LIBSUFFIX = '.lib'
PROGSUFFIX = '.exe'

34
build/config-win32-icl.py Normal file
View File

@ -0,0 +1,34 @@
BUILDDIR = '#build/release'
DISTDIR = '#dist'
CXX = 'icl'
CC = 'icl'
LINK = 'xilink'
CXXFLAGS = ['/nologo', '/O3', '/Qipo', '/QxSSE2', '/QaxSSE3,SSE4.2', '/fp:fast=2', '/D', 'WIN32', '/W3', '/Qdiag-disable:803' ,'/Qdiag-disable:2415', '/Qdiag-disable:2586', '/EHsc', '/GS-', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'SPECTRUM_SAMPLES=3', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'OPENEXR_DLL', '/D', 'NDEBUG', '/Qopenmp']
SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86'
MSVC_VERSION = '10.0'
INTEL_COMPILER = True
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X86', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/NODEFAULTLIB:LIBCMT', '/MANIFEST', '/Qdiag-disable:11024']
BASEINCLUDE = ['#include', '#dependencies/include']
BASELIB = ['msvcrt', 'ws2_32', 'Half']
BASELIBDIR = ['#dependencies/lib/i386']
OEXRINCLUDE = ['#dependencies/include/openexr']
OEXRLIB = ['IlmImf', 'IlmThread', 'Iex', 'zdll']
BOOSTLIB = ['boost_system-vc100-mt-1_50', 'boost_filesystem-vc100-mt-1_50', 'boost_thread-vc100-mt-1_50']
COLLADAINCLUDE = ['#dependencies/include/collada-dom', '#dependencies/include/collada-dom/1.4']
COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng15']
JPEGLIB = ['jpeg']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX']
SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll'
LIBSUFFIX = '.lib'
PROGSUFFIX = '.exe'
PYTHON27LIB = ['boost_python-vc100-mt-1_50', 'python27']
PYTHON27INCLUDE = ['#dependencies/include/python27']
PYTHON32LIB = ['boost_python3-vc100-mt-1_50', 'python32']
PYTHON32INCLUDE = ['#dependencies/include/python32']
QTINCLUDE = ['#dependencies/qt/include']
QTDIR = '#dependencies/qt/i386'

View File

@ -0,0 +1,32 @@
BUILDDIR = '#build/debug'
DISTDIR = '#dist'
CXX = 'cl'
CC = 'cl'
CXXFLAGS = ['/nologo', '/Od', '/Z7', '/fp:fast', '/arch:SSE2', '/D', 'WIN32', '/W3', '/EHsc', '/GS-', '/GL', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'SPECTRUM_SAMPLES=3', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'DEBUG', '/D', 'OPENEXR_DLL', '/openmp']
SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86'
MSVC_VERSION = '10.0'
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/DEBUG', '/MACHINE:X86', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/LTCG', '/NODEFAULTLIB:LIBCMT', '/MANIFEST']
BASEINCLUDE = ['#include', '#dependencies/include']
BASELIB = ['msvcrt', 'ws2_32', 'Half']
BASELIBDIR = ['#dependencies/lib/i386']
OEXRINCLUDE = ['#dependencies/include/openexr']
OEXRLIB = ['IlmImf', 'IlmThread', 'Iex', 'zdll']
BOOSTLIB = ['boost_system-vc100-mt-1_50', 'boost_filesystem-vc100-mt-1_50', 'boost_thread-vc100-mt-1_50']
COLLADAINCLUDE = ['#dependencies/include/collada-dom', '#dependencies/include/collada-dom/1.4']
COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng15']
JPEGLIB = ['jpeg']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX']
SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll'
LIBSUFFIX = '.lib'
PROGSUFFIX = '.exe'
PYTHON27LIB = ['boost_python-vc100-mt-1_50', 'python27']
PYTHON27INCLUDE = ['#dependencies/include/python27']
PYTHON32LIB = ['boost_python3-vc100-mt-1_50', 'python32']
PYTHON32INCLUDE = ['#dependencies/include/python32']
QTINCLUDE = ['#dependencies/qt/include']
QTDIR = '#dependencies/qt/i386'

View File

@ -0,0 +1,35 @@
BUILDDIR = '#build/release'
DISTDIR = '#dist'
CXX = 'cl'
CC = 'cl'
# /O2=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS
CXXFLAGS = ['/nologo', '/O2', '/fp:fast', '/arch:SSE2', '/D', 'WIN32', '/W3', '/EHsc', '/GS-', '/GL', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'SPECTRUM_SAMPLES=3', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/D', 'OPENEXR_DLL', '/openmp']
SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86'
MSVC_VERSION = '10.0'
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X86', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/LTCG', '/NODEFAULTLIB:LIBCMT', '/MANIFEST']
BASEINCLUDE = ['#include', '#dependencies/include']
BASELIB = ['msvcrt', 'ws2_32', 'Half']
BASELIBDIR = ['#dependencies/lib/i386']
OEXRINCLUDE = ['#dependencies/include/openexr']
OEXRLIB = ['IlmImf', 'IlmThread', 'Iex', 'zdll']
BOOSTLIB = ['boost_system-vc100-mt-1_50', 'boost_filesystem-vc100-mt-1_50', 'boost_thread-vc100-mt-1_50']
COLLADAINCLUDE = ['#dependencies/include/collada-dom', '#dependencies/include/collada-dom/1.4']
COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng15']
JPEGLIB = ['jpeg']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX']
SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll'
LIBSUFFIX = '.lib'
PROGSUFFIX = '.exe'
PYTHON27LIB = ['boost_python-vc100-mt-1_50', 'python27']
PYTHON27INCLUDE = ['#dependencies/include/python27']
PYTHON32LIB = ['boost_python3-vc100-mt-1_50', 'python32']
PYTHON32INCLUDE = ['#dependencies/include/python32']
QTINCLUDE = ['#dependencies/qt/include']
QTDIR = '#dependencies/qt/i386'

34
build/config-win64-icl.py Normal file
View File

@ -0,0 +1,34 @@
BUILDDIR = '#build/release'
DISTDIR = '#dist'
CXX = 'icl'
CC = 'icl'
LINK = 'xilink'
CXXFLAGS = ['/nologo', '/O3', '/Qipo', '/QxSSE2', '/QaxSSE3,SSE4.2', '/fp:fast=2', '/D', 'WIN32', '/D', 'WIN64', '/W3', '/Qdiag-disable:803' ,'/Qdiag-disable:2415', '/Qdiag-disable:2586', '/EHsc', '/GS-', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'SPECTRUM_SAMPLES=3', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'OPENEXR_DLL', '/D', 'NDEBUG', '/Qopenmp']
SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86_64'
MSVC_VERSION = '10.0'
INTEL_COMPILER = True
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X64', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/NODEFAULTLIB:LIBCMT', '/MANIFEST', '/Qdiag-disable:11024']
BASEINCLUDE = ['#include', '#dependencies/include']
BASELIB = ['msvcrt', 'ws2_32', 'Half']
BASELIBDIR = ['#dependencies/lib/x64']
OEXRINCLUDE = ['#dependencies/include/openexr']
OEXRLIB = ['IlmImf', 'IlmThread', 'Iex', 'zdll']
BOOSTLIB = ['boost_system-vc100-mt-1_50', 'boost_filesystem-vc100-mt-1_50', 'boost_thread-vc100-mt-1_50']
COLLADAINCLUDE = ['#dependencies/include/collada-dom', '#dependencies/include/collada-dom/1.4']
COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng15']
JPEGLIB = ['jpeg']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX']
SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll'
LIBSUFFIX = '.lib'
PROGSUFFIX = '.exe'
PYTHON27LIB = ['boost_python-vc100-mt-1_50', 'python27']
PYTHON27INCLUDE = ['#dependencies/include/python27']
PYTHON32LIB = ['boost_python3-vc100-mt-1_50', 'python32']
PYTHON32INCLUDE = ['#dependencies/include/python32']
QTINCLUDE = ['#dependencies/qt/include']
QTDIR = '#dependencies/qt/x64'

View File

@ -0,0 +1,32 @@
BUILDDIR = '#build/debug'
DISTDIR = '#dist'
CXX = 'cl'
CC = 'cl'
CXXFLAGS = ['/nologo', '/Od', '/Z7', '/fp:fast', '/D', 'WIN32', '/D', 'WIN64', '/W3', '/EHsc', '/GS-', '/GL', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'SPECTRUM_SAMPLES=3', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'DEBUG', '/D', 'OPENEXR_DLL', '/openmp']
SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86_64'
MSVC_VERSION = '10.0'
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/DEBUG', '/MACHINE:X64', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/LTCG', '/NODEFAULTLIB:LIBCMT', '/MANIFEST']
BASEINCLUDE = ['#include', '#dependencies/include']
BASELIB = ['msvcrt', 'ws2_32', 'Half']
BASELIBDIR = ['#dependencies/lib/x64']
OEXRINCLUDE = ['#dependencies/include/openexr']
OEXRLIB = ['IlmImf', 'IlmThread', 'Iex', 'zdll']
BOOSTLIB = ['boost_system-vc100-mt-1_50', 'boost_filesystem-vc100-mt-1_50', 'boost_thread-vc100-mt-1_50']
COLLADAINCLUDE = ['#dependencies/include/collada-dom', '#dependencies/include/collada-dom/1.4']
COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng15']
JPEGLIB = ['jpeg']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX']
SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll'
LIBSUFFIX = '.lib'
PROGSUFFIX = '.exe'
PYTHON27LIB = ['boost_python-vc100-mt-1_50', 'python27']
PYTHON27INCLUDE = ['#dependencies/include/python27']
PYTHON32LIB = ['boost_python3-vc100-mt-1_50', 'python32']
PYTHON32INCLUDE = ['#dependencies/include/python32']
QTINCLUDE = ['#dependencies/qt/include']
QTDIR = '#dependencies/qt/x64'

View File

@ -0,0 +1,35 @@
BUILDDIR = '#build/release'
DISTDIR = '#dist'
CXX = 'cl'
CC = 'cl'
# /O2=optimize for speed, global optimizations, intrinsic functions, favor fast code, frame pointer omission
# /EHsc=C++ exceptions, /fp:fast=Enable reasonable FP optimizations, /GS-=No buffer security checks, /GL=whole program optimizations
# To include debug information add '/Z7' to CXXFLAGS and '/DEBUG' to LINKFLAGS
CXXFLAGS = ['/nologo', '/O2', '/fp:fast', '/D', 'WIN32', '/D', 'WIN64', '/W3', '/EHsc', '/GS-', '/GL', '/MD', '/D', 'MTS_DEBUG', '/D', 'SINGLE_PRECISION', '/D', 'SPECTRUM_SAMPLES=3', '/D', 'MTS_SSE', '/D', 'MTS_HAS_COHERENT_RT', '/D', '_CONSOLE', '/D', 'NDEBUG', '/D', 'OPENEXR_DLL', '/openmp']
SHCXXFLAGS = CXXFLAGS
TARGET_ARCH = 'x86_64'
MSVC_VERSION = '10.0'
LINKFLAGS = ['/nologo', '/SUBSYSTEM:CONSOLE', '/MACHINE:X64', '/FIXED:NO', '/OPT:REF', '/OPT:ICF', '/LTCG', '/NODEFAULTLIB:LIBCMT', '/MANIFEST']
BASEINCLUDE = ['#include', '#dependencies/include']
BASELIB = ['msvcrt', 'ws2_32', 'Half']
BASELIBDIR = ['#dependencies/lib/x64']
OEXRINCLUDE = ['#dependencies/include/openexr']
OEXRLIB = ['IlmImf', 'IlmThread', 'Iex', 'zdll']
BOOSTLIB = ['boost_system-vc100-mt-1_50', 'boost_filesystem-vc100-mt-1_50', 'boost_thread-vc100-mt-1_50']
COLLADAINCLUDE = ['#dependencies/include/collada-dom', '#dependencies/include/collada-dom/1.4']
COLLADALIB = ['libcollada14dom23']
XERCESLIB = ['xerces-c_3']
PNGLIB = ['libpng15']
JPEGLIB = ['jpeg']
GLLIB = ['opengl32', 'glu32', 'glew32mx', 'gdi32', 'user32']
GLFLAGS = ['/D', 'GLEW_MX']
SHLIBPREFIX = 'lib'
SHLIBSUFFIX = '.dll'
LIBSUFFIX = '.lib'
PROGSUFFIX = '.exe'
PYTHON27LIB = ['boost_python-vc100-mt-1_50', 'python27']
PYTHON27INCLUDE = ['#dependencies/include/python27']
PYTHON32LIB = ['boost_python3-vc100-mt-1_50', 'python32']
PYTHON32INCLUDE = ['#dependencies/include/python32']
QTINCLUDE = ['#dependencies/qt/include']
QTDIR = '#dependencies/qt/x64'

View File

@ -1,26 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mitsuba", "mitsuba-msvc2008.vcproj", "{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}.Debug|Win32.ActiveCfg = Debug|Win32
{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}.Debug|Win32.Build.0 = Debug|Win32
{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}.Debug|x64.ActiveCfg = Debug|x64
{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}.Debug|x64.Build.0 = Debug|x64
{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}.Release|Win32.ActiveCfg = Release|Win32
{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}.Release|Win32.Build.0 = Release|Win32
{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}.Release|x64.ActiveCfg = Release|x64
{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,534 +0,0 @@
<VisualStudioProject ProjectType="Visual C++" Version="9.00" Name="mitsuba" ProjectGUID="{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}" RootNamespace="mitsuba" Keyword="MakeFileProj" TargetFrameworkVersion="0">
<Platforms>
<Platform Name="Win32"/>
<Platform Name="x64"/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration Name="Debug|Win32" OutputDirectory="Debug" IntermediateDirectory="Debug" ConfigurationType="0">
<Tool Name="VCNMakeTool" BuildCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win32-debug.py" ReBuildCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win32-debug.py -c &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win32-debug.py" CleanCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win32-debug.py -c" Output="..\dist\mtsgui.exe" PreprocessorDefinitions="WIN32;_DEBUG;" IncludeSearchPath="..\include" ForcedIncludes="" AssemblySearchPath="" ForcedUsingAssemblies="" CompileAsManaged=""/>
</Configuration>
<Configuration Name="Release|Win32" OutputDirectory="Release" IntermediateDirectory="Release" ConfigurationType="0">
<Tool Name="VCNMakeTool" BuildCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win32.py" ReBuildCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win32.py -c &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win32.py" CleanCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win32.py -c" Output="..\dist\mtsgui.exe" PreprocessorDefinitions="WIN32;NDEBUG;SINGLE_PRECISION" IncludeSearchPath="..\include" ForcedIncludes="" AssemblySearchPath="" ForcedUsingAssemblies="" CompileAsManaged=""/>
</Configuration>
<Configuration Name="Debug|x64" OutputDirectory="Debug" IntermediateDirectory="Debug" ConfigurationType="0">
<Tool Name="VCNMakeTool" BuildCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win64-debug.py" ReBuildCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win64-debug.py -c &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win64-debug.py" CleanCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win64-debug.py -c" Output="..\dist\mtsgui.exe" PreprocessorDefinitions="WIN32;_DEBUG;" IncludeSearchPath="..\include" ForcedIncludes="" AssemblySearchPath="" ForcedUsingAssemblies="" CompileAsManaged=""/>
</Configuration>
<Configuration Name="Release|x64" OutputDirectory="Release" IntermediateDirectory="Release" ConfigurationType="0">
<Tool Name="VCNMakeTool" BuildCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win64.py" ReBuildCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win64.py -c &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win64.py" CleanCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win64.py -c" Output="..\dist\mtsgui.exe" PreprocessorDefinitions="WIN32;NDEBUG;SINGLE_PRECISION" IncludeSearchPath="..\include" ForcedIncludes="" AssemblySearchPath="" ForcedUsingAssemblies="" CompileAsManaged=""/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
<Filter Name="mitsuba">
<Filter Name="bidir">
<File RelativePath="..\.\include\mitsuba\bidir\rsampler.h"/>
</Filter>
<Filter Name="core">
<File RelativePath="..\.\include\mitsuba\core\aabb.h"/>
<File RelativePath="..\.\include\mitsuba\core\aabb_sse.h"/>
<File RelativePath="..\.\include\mitsuba\core\appender.h"/>
<File RelativePath="..\.\include\mitsuba\core\atomic.h"/>
<File RelativePath="..\.\include\mitsuba\core\bitmap.h"/>
<File RelativePath="..\.\include\mitsuba\core\brent.h"/>
<File RelativePath="..\.\include\mitsuba\core\bsphere.h"/>
<File RelativePath="..\.\include\mitsuba\core\chisquare.h"/>
<File RelativePath="..\.\include\mitsuba\core\class.h"/>
<File RelativePath="..\.\include\mitsuba\core\cobject.h"/>
<File RelativePath="..\.\include\mitsuba\core\constants.h"/>
<File RelativePath="..\.\include\mitsuba\core\cstream.h"/>
<File RelativePath="..\.\include\mitsuba\core\formatter.h"/>
<File RelativePath="..\.\include\mitsuba\core\frame.h"/>
<File RelativePath="..\.\include\mitsuba\core\fresolver.h"/>
<File RelativePath="..\.\include\mitsuba\core\fstream.h"/>
<File RelativePath="..\.\include\mitsuba\core\fwd.h"/>
<File RelativePath="..\.\include\mitsuba\core\getopt.h"/>
<File RelativePath="..\.\include\mitsuba\core\kdtree.h"/>
<File RelativePath="..\.\include\mitsuba\core\lock.h"/>
<File RelativePath="..\.\include\mitsuba\core\logger.h"/>
<File RelativePath="..\.\include\mitsuba\core\lrucache.h"/>
<File RelativePath="..\.\include\mitsuba\core\matrix.h"/>
<File RelativePath="..\.\include\mitsuba\core\matrix.inl"/>
<File RelativePath="..\.\include\mitsuba\core\mempool.h"/>
<File RelativePath="..\.\include\mitsuba\core\mmap.h"/>
<File RelativePath="..\.\include\mitsuba\core\mstream.h"/>
<File RelativePath="..\.\include\mitsuba\core\netobject.h"/>
<File RelativePath="..\.\include\mitsuba\core\normal.h"/>
<File RelativePath="..\.\include\mitsuba\core\object.h"/>
<File RelativePath="..\.\include\mitsuba\core\octree.h"/>
<File RelativePath="..\.\include\mitsuba\core\pdf.h"/>
<File RelativePath="..\.\include\mitsuba\core\platform.h"/>
<File RelativePath="..\.\include\mitsuba\core\plugin.h"/>
<File RelativePath="..\.\include\mitsuba\core\point.h"/>
<File RelativePath="..\.\include\mitsuba\core\properties.h"/>
<File RelativePath="..\.\include\mitsuba\core\quad.h"/>
<File RelativePath="..\.\include\mitsuba\core\quat.h"/>
<File RelativePath="..\.\include\mitsuba\core\random.h"/>
<File RelativePath="..\.\include\mitsuba\core\ray.h"/>
<File RelativePath="..\.\include\mitsuba\core\ref.h"/>
<File RelativePath="..\.\include\mitsuba\core\sched.h"/>
<File RelativePath="..\.\include\mitsuba\core\sched_remote.h"/>
<File RelativePath="..\.\include\mitsuba\core\serialization.h"/>
<File RelativePath="..\.\include\mitsuba\core\sfcurve.h"/>
<File RelativePath="..\.\include\mitsuba\core\shvector.h"/>
<File RelativePath="..\.\include\mitsuba\core\spectrum.h"/>
<File RelativePath="..\.\include\mitsuba\core\spline.h"/>
<File RelativePath="..\.\include\mitsuba\core\sse.h"/>
<File RelativePath="..\.\include\mitsuba\core\sshstream.h"/>
<File RelativePath="..\.\include\mitsuba\core\sstream.h"/>
<File RelativePath="..\.\include\mitsuba\core\statistics.h"/>
<File RelativePath="..\.\include\mitsuba\core\stl.h"/>
<File RelativePath="..\.\include\mitsuba\core\stream.h"/>
<File RelativePath="..\.\include\mitsuba\core\thread.h"/>
<File RelativePath="..\.\include\mitsuba\core\timer.h"/>
<File RelativePath="..\.\include\mitsuba\core\tls.h"/>
<File RelativePath="..\.\include\mitsuba\core\transform.h"/>
<File RelativePath="..\.\include\mitsuba\core\triangle.h"/>
<File RelativePath="..\.\include\mitsuba\core\util.h"/>
<File RelativePath="..\.\include\mitsuba\core\vector.h"/>
<File RelativePath="..\.\include\mitsuba\core\version.h"/>
<File RelativePath="..\.\include\mitsuba\core\wavelet.h"/>
<File RelativePath="..\.\include\mitsuba\core\zstream.h"/>
</Filter>
<Filter Name="hw">
<File RelativePath="..\.\include\mitsuba\hw\basicshader.h"/>
<File RelativePath="..\.\include\mitsuba\hw\device.h"/>
<File RelativePath="..\.\include\mitsuba\hw\font.h"/>
<File RelativePath="..\.\include\mitsuba\hw\glgeometry.h"/>
<File RelativePath="..\.\include\mitsuba\hw\glprogram.h"/>
<File RelativePath="..\.\include\mitsuba\hw\glrenderer.h"/>
<File RelativePath="..\.\include\mitsuba\hw\glsync.h"/>
<File RelativePath="..\.\include\mitsuba\hw\gltexture.h"/>
<File RelativePath="..\.\include\mitsuba\hw\glxdevice.h"/>
<File RelativePath="..\.\include\mitsuba\hw\glxrenderer.h"/>
<File RelativePath="..\.\include\mitsuba\hw\gpugeometry.h"/>
<File RelativePath="..\.\include\mitsuba\hw\gpuprogram.h"/>
<File RelativePath="..\.\include\mitsuba\hw\gpusync.h"/>
<File RelativePath="..\.\include\mitsuba\hw\gputexture.h"/>
<File RelativePath="..\.\include\mitsuba\hw\nsgldevice.h"/>
<File RelativePath="..\.\include\mitsuba\hw\nsglkeys.h"/>
<File RelativePath="..\.\include\mitsuba\hw\nsglrenderer.h"/>
<File RelativePath="..\.\include\mitsuba\hw\nsglsession.h"/>
<File RelativePath="..\.\include\mitsuba\hw\renderer.h"/>
<File RelativePath="..\.\include\mitsuba\hw\session.h"/>
<File RelativePath="..\.\include\mitsuba\hw\viewer.h"/>
<File RelativePath="..\.\include\mitsuba\hw\vpl.h"/>
<File RelativePath="..\.\include\mitsuba\hw\wgldevice.h"/>
<File RelativePath="..\.\include\mitsuba\hw\wglrenderer.h"/>
<File RelativePath="..\.\include\mitsuba\hw\wglsession.h"/>
<File RelativePath="..\.\include\mitsuba\hw\x11device.h"/>
<File RelativePath="..\.\include\mitsuba\hw\x11session.h"/>
</Filter>
<File RelativePath="..\.\include\mitsuba\mitsuba.h"/>
<Filter Name="render">
<File RelativePath="..\.\include\mitsuba\render\bsdf.h"/>
<File RelativePath="..\.\include\mitsuba\render\camera.h"/>
<File RelativePath="..\.\include\mitsuba\render\common.h"/>
<File RelativePath="..\.\include\mitsuba\render\film.h"/>
<File RelativePath="..\.\include\mitsuba\render\fwd.h"/>
<File RelativePath="..\.\include\mitsuba\render\gatherproc.h"/>
<File RelativePath="..\.\include\mitsuba\render\gkdtree.h"/>
<File RelativePath="..\.\include\mitsuba\render\imageblock.h"/>
<File RelativePath="..\.\include\mitsuba\render\imageproc.h"/>
<File RelativePath="..\.\include\mitsuba\render\integrator.h"/>
<File RelativePath="..\.\include\mitsuba\render\irrcache.h"/>
<File RelativePath="..\.\include\mitsuba\render\luminaire.h"/>
<File RelativePath="..\.\include\mitsuba\render\medium.h"/>
<File RelativePath="..\.\include\mitsuba\render\mipmap.h"/>
<File RelativePath="..\.\include\mitsuba\render\mipmap3d.h"/>
<File RelativePath="..\.\include\mitsuba\render\noise.h"/>
<File RelativePath="..\.\include\mitsuba\render\particleproc.h"/>
<File RelativePath="..\.\include\mitsuba\render\phase.h"/>
<File RelativePath="..\.\include\mitsuba\render\photon.h"/>
<File RelativePath="..\.\include\mitsuba\render\photonmap.h"/>
<File RelativePath="..\.\include\mitsuba\render\preview.h"/>
<File RelativePath="..\.\include\mitsuba\render\range.h"/>
<File RelativePath="..\.\include\mitsuba\render\records.inl"/>
<File RelativePath="..\.\include\mitsuba\render\rectwu.h"/>
<File RelativePath="..\.\include\mitsuba\render\renderjob.h"/>
<File RelativePath="..\.\include\mitsuba\render\renderproc.h"/>
<File RelativePath="..\.\include\mitsuba\render\renderqueue.h"/>
<File RelativePath="..\.\include\mitsuba\render\rfilter.h"/>
<File RelativePath="..\.\include\mitsuba\render\sahkdtree3.h"/>
<File RelativePath="..\.\include\mitsuba\render\sampler.h"/>
<File RelativePath="..\.\include\mitsuba\render\scene.h"/>
<File RelativePath="..\.\include\mitsuba\render\scenehandler.h"/>
<File RelativePath="..\.\include\mitsuba\render\shader.h"/>
<File RelativePath="..\.\include\mitsuba\render\shape.h"/>
<File RelativePath="..\.\include\mitsuba\render\skdtree.h"/>
<File RelativePath="..\.\include\mitsuba\render\spiral.h"/>
<File RelativePath="..\.\include\mitsuba\render\subsurface.h"/>
<File RelativePath="..\.\include\mitsuba\render\testcase.h"/>
<File RelativePath="..\.\include\mitsuba\render\texture.h"/>
<File RelativePath="..\.\include\mitsuba\render\track.h"/>
<File RelativePath="..\.\include\mitsuba\render\triaccel.h"/>
<File RelativePath="..\.\include\mitsuba\render\triaccel_sse.h"/>
<File RelativePath="..\.\include\mitsuba\render\trimesh.h"/>
<File RelativePath="..\.\include\mitsuba\render\util.h"/>
<File RelativePath="..\.\include\mitsuba\render\volume.h"/>
<File RelativePath="..\.\include\mitsuba\render\vpl.h"/>
</Filter>
</Filter>
</Filter>
<Filter Name="Source Files" Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
<Filter Name="bsdfs">
<File RelativePath="..\.\src\bsdfs\bump.cpp"/>
<File RelativePath="..\.\src\bsdfs\coating.cpp"/>
<File RelativePath="..\.\src\bsdfs\conductor.cpp"/>
<File RelativePath="..\.\src\bsdfs\dielectric.cpp"/>
<File RelativePath="..\.\src\bsdfs\difftrans.cpp"/>
<File RelativePath="..\.\src\bsdfs\diffuse.cpp"/>
<File RelativePath="..\.\src\bsdfs\dipolebrdf.cpp"/>
<File RelativePath="..\.\src\bsdfs\hk.cpp"/>
<File RelativePath="..\.\src\bsdfs\ior.h"/>
<File RelativePath="..\.\src\bsdfs\irawan.cpp"/>
<File RelativePath="..\.\src\bsdfs\irawan.h"/>
<File RelativePath="..\.\src\bsdfs\mask.cpp"/>
<File RelativePath="..\.\src\bsdfs\microfacet.h"/>
<File RelativePath="..\.\src\bsdfs\mixturebsdf.cpp"/>
<File RelativePath="..\.\src\bsdfs\phong.cpp"/>
<File RelativePath="..\.\src\bsdfs\plastic.cpp"/>
<File RelativePath="..\.\src\bsdfs\roughcoating.cpp"/>
<File RelativePath="..\.\src\bsdfs\roughconductor.cpp"/>
<File RelativePath="..\.\src\bsdfs\roughdielectric.cpp"/>
<File RelativePath="..\.\src\bsdfs\roughdiffuse.cpp"/>
<File RelativePath="..\.\src\bsdfs\roughplastic.cpp"/>
<File RelativePath="..\.\src\bsdfs\sssbrdf.cpp"/>
<File RelativePath="..\.\src\bsdfs\twosided.cpp"/>
<File RelativePath="..\.\src\bsdfs\ward.cpp"/>
</Filter>
<Filter Name="cameras">
<File RelativePath="..\.\src\cameras\environment.cpp"/>
<File RelativePath="..\.\src\cameras\orthographic.cpp"/>
<File RelativePath="..\.\src\cameras\perspective.cpp"/>
</Filter>
<Filter Name="converter">
<File RelativePath="..\.\src\converter\collada.cpp"/>
<File RelativePath="..\.\src\converter\converter.cpp"/>
<File RelativePath="..\.\src\converter\converter.h"/>
<File RelativePath="..\.\src\converter\mtsimport.cpp"/>
<File RelativePath="..\.\src\converter\obj.cpp"/>
</Filter>
<Filter Name="films">
<File RelativePath="..\.\src\films\banner.h"/>
<File RelativePath="..\.\src\films\exrfilm.cpp"/>
<File RelativePath="..\.\src\films\mfilm.cpp"/>
<File RelativePath="..\.\src\films\pngfilm.cpp"/>
</Filter>
<Filter Name="integrators">
<Filter Name="direct">
<File RelativePath="..\.\src\integrators\direct\direct.cpp"/>
</Filter>
<Filter Name="misc">
<File RelativePath="..\.\src\integrators\misc\errctrl.cpp"/>
<File RelativePath="..\.\src\integrators\misc\irrcache.cpp"/>
<File RelativePath="..\.\src\integrators\misc\irrcache_proc.cpp"/>
<File RelativePath="..\.\src\integrators\misc\irrcache_proc.h"/>
</Filter>
<Filter Name="path">
<File RelativePath="..\.\src\integrators\path\path.cpp"/>
<File RelativePath="..\.\src\integrators\path\ptracer.cpp"/>
<File RelativePath="..\.\src\integrators\path\ptracer_proc.cpp"/>
<File RelativePath="..\.\src\integrators\path\ptracer_proc.h"/>
<File RelativePath="..\.\src\integrators\path\volpath.cpp"/>
<File RelativePath="..\.\src\integrators\path\volpath_simple.cpp"/>
</Filter>
<Filter Name="photonmapper">
<File RelativePath="..\.\src\integrators\photonmapper\bre.cpp"/>
<File RelativePath="..\.\src\integrators\photonmapper\bre.h"/>
<File RelativePath="..\.\src\integrators\photonmapper\photonmapper.cpp"/>
<File RelativePath="..\.\src\integrators\photonmapper\ppm.cpp"/>
<File RelativePath="..\.\src\integrators\photonmapper\sppm.cpp"/>
</Filter>
<Filter Name="vpl">
<File RelativePath="..\.\src\integrators\vpl\vpl.cpp"/>
</Filter>
</Filter>
<Filter Name="libbidir">
<File RelativePath="..\.\src\libbidir\rsampler.cpp"/>
</Filter>
<Filter Name="libcore">
<File RelativePath="..\.\src\libcore\aabb.cpp"/>
<File RelativePath="..\.\src\libcore\appender.cpp"/>
<File RelativePath="..\.\src\libcore\bitmap.cpp"/>
<File RelativePath="..\.\src\libcore\brent.cpp"/>
<File RelativePath="..\.\src\libcore\chisquare.cpp"/>
<File RelativePath="..\.\src\libcore\class.cpp"/>
<File RelativePath="..\.\src\libcore\cstream.cpp"/>
<File RelativePath="..\.\src\libcore\formatter.cpp"/>
<File RelativePath="..\.\src\libcore\fresolver.cpp"/>
<File RelativePath="..\.\src\libcore\fstream.cpp"/>
<File RelativePath="..\.\src\libcore\getopt.c"/>
<File RelativePath="..\.\src\libcore\lock.cpp"/>
<File RelativePath="..\.\src\libcore\logger.cpp"/>
<File RelativePath="..\.\src\libcore\mmap.cpp"/>
<File RelativePath="..\.\src\libcore\mstream.cpp"/>
<File RelativePath="..\.\src\libcore\object.cpp"/>
<File RelativePath="..\.\src\libcore\platform_win32.cpp"/>
<File RelativePath="..\.\src\libcore\plugin.cpp"/>
<File RelativePath="..\.\src\libcore\properties.cpp"/>
<File RelativePath="..\.\src\libcore\quad.cpp"/>
<File RelativePath="..\.\src\libcore\random.cpp"/>
<File RelativePath="..\.\src\libcore\sched.cpp"/>
<File RelativePath="..\.\src\libcore\sched_remote.cpp"/>
<File RelativePath="..\.\src\libcore\serialization.cpp"/>
<File RelativePath="..\.\src\libcore\shvector.cpp"/>
<File RelativePath="..\.\src\libcore\spectrum.cpp"/>
<File RelativePath="..\.\src\libcore\spline.cpp"/>
<File RelativePath="..\.\src\libcore\sshstream.cpp"/>
<File RelativePath="..\.\src\libcore\sstream.cpp"/>
<File RelativePath="..\.\src\libcore\statistics.cpp"/>
<File RelativePath="..\.\src\libcore\stream.cpp"/>
<File RelativePath="..\.\src\libcore\thread.cpp"/>
<File RelativePath="..\.\src\libcore\timer.cpp"/>
<File RelativePath="..\.\src\libcore\transform.cpp"/>
<File RelativePath="..\.\src\libcore\triangle.cpp"/>
<File RelativePath="..\.\src\libcore\util.cpp"/>
<File RelativePath="..\.\src\libcore\wavelet.cpp"/>
<File RelativePath="..\.\src\libcore\zstream.cpp"/>
</Filter>
<Filter Name="libhw">
<File RelativePath="..\.\src\libhw\basicshader.cpp"/>
<File RelativePath="..\.\src\libhw\device.cpp"/>
<File RelativePath="..\.\src\libhw\font.cpp"/>
<File RelativePath="..\.\src\libhw\glgeometry.cpp"/>
<File RelativePath="..\.\src\libhw\glprogram.cpp"/>
<File RelativePath="..\.\src\libhw\glrenderer.cpp"/>
<File RelativePath="..\.\src\libhw\glsync.cpp"/>
<File RelativePath="..\.\src\libhw\gltexture.cpp"/>
<File RelativePath="..\.\src\libhw\glxdevice.cpp"/>
<File RelativePath="..\.\src\libhw\glxrenderer.cpp"/>
<File RelativePath="..\.\src\libhw\gpugeometry.cpp"/>
<File RelativePath="..\.\src\libhw\gpuprogram.cpp"/>
<File RelativePath="..\.\src\libhw\gpusync.cpp"/>
<File RelativePath="..\.\src\libhw\gputexture.cpp"/>
<File RelativePath="..\.\src\libhw\renderer.cpp"/>
<File RelativePath="..\.\src\libhw\session.cpp"/>
<File RelativePath="..\.\src\libhw\vera14_dsc.h"/>
<File RelativePath="..\.\src\libhw\vera14_png.h"/>
<File RelativePath="..\.\src\libhw\veramono14_dsc.h"/>
<File RelativePath="..\.\src\libhw\veramono14_png.h"/>
<File RelativePath="..\.\src\libhw\viewer.cpp"/>
<File RelativePath="..\.\src\libhw\vpl.cpp"/>
<File RelativePath="..\.\src\libhw\wgldevice.cpp"/>
<File RelativePath="..\.\src\libhw\wglrenderer.cpp"/>
<File RelativePath="..\.\src\libhw\wglsession.cpp"/>
<File RelativePath="..\.\src\libhw\x11device.cpp"/>
<File RelativePath="..\.\src\libhw\x11session.cpp"/>
</Filter>
<Filter Name="libpython">
<File RelativePath="..\.\src\libpython\base.h"/>
<File RelativePath="..\.\src\libpython\core.cpp"/>
<File RelativePath="..\.\src\libpython\render.cpp"/>
</Filter>
<Filter Name="librender">
<File RelativePath="..\.\src\librender\bsdf.cpp"/>
<File RelativePath="..\.\src\librender\camera.cpp"/>
<File RelativePath="..\.\src\librender\common.cpp"/>
<File RelativePath="..\.\src\librender\film.cpp"/>
<File RelativePath="..\.\src\librender\gatherproc.cpp"/>
<File RelativePath="..\.\src\librender\imageblock.cpp"/>
<File RelativePath="..\.\src\librender\imageproc.cpp"/>
<File RelativePath="..\.\src\librender\integrator.cpp"/>
<File RelativePath="..\.\src\librender\intersection.cpp"/>
<File RelativePath="..\.\src\librender\irrcache.cpp"/>
<File RelativePath="..\.\src\librender\luminaire.cpp"/>
<File RelativePath="..\.\src\librender\medium.cpp"/>
<File RelativePath="..\.\src\librender\mipmap.cpp"/>
<File RelativePath="..\.\src\librender\mipmap3d.cpp"/>
<File RelativePath="..\.\src\librender\noise.cpp"/>
<File RelativePath="..\.\src\librender\particleproc.cpp"/>
<File RelativePath="..\.\src\librender\phase.cpp"/>
<File RelativePath="..\.\src\librender\photon.cpp"/>
<File RelativePath="..\.\src\librender\photonmap.cpp"/>
<File RelativePath="..\.\src\librender\preview.cpp"/>
<File RelativePath="..\.\src\librender\rectwu.cpp"/>
<File RelativePath="..\.\src\librender\renderjob.cpp"/>
<File RelativePath="..\.\src\librender\renderproc.cpp"/>
<File RelativePath="..\.\src\librender\renderqueue.cpp"/>
<File RelativePath="..\.\src\librender\rfilter.cpp"/>
<File RelativePath="..\.\src\librender\sampler.cpp"/>
<File RelativePath="..\.\src\librender\scene.cpp"/>
<File RelativePath="..\.\src\librender\scenehandler.cpp"/>
<File RelativePath="..\.\src\librender\shader.cpp"/>
<File RelativePath="..\.\src\librender\shape.cpp"/>
<File RelativePath="..\.\src\librender\skdtree.cpp"/>
<File RelativePath="..\.\src\librender\subsurface.cpp"/>
<File RelativePath="..\.\src\librender\testcase.cpp"/>
<File RelativePath="..\.\src\librender\texture.cpp"/>
<File RelativePath="..\.\src\librender\track.cpp"/>
<File RelativePath="..\.\src\librender\trimesh.cpp"/>
<File RelativePath="..\.\src\librender\util.cpp"/>
<File RelativePath="..\.\src\librender\volume.cpp"/>
<File RelativePath="..\.\src\librender\vpl.cpp"/>
</Filter>
<Filter Name="luminaires">
<File RelativePath="..\.\src\luminaires\area.cpp"/>
<File RelativePath="..\.\src\luminaires\collimated.cpp"/>
<File RelativePath="..\.\src\luminaires\constant.cpp"/>
<File RelativePath="..\.\src\luminaires\directional.cpp"/>
<File RelativePath="..\.\src\luminaires\envmap.cpp"/>
<File RelativePath="..\.\src\luminaires\point.cpp"/>
<File RelativePath="..\.\src\luminaires\sky.cpp"/>
<File RelativePath="..\.\src\luminaires\spot.cpp"/>
<File RelativePath="..\.\src\luminaires\sun.cpp"/>
<File RelativePath="..\.\src\luminaires\sun.h"/>
<File RelativePath="..\.\src\luminaires\sunsky.cpp"/>
</Filter>
<Filter Name="medium">
<File RelativePath="..\.\src\medium\heterogeneous.cpp"/>
<File RelativePath="..\.\src\medium\homogeneous.cpp"/>
<File RelativePath="..\.\src\medium\materials.h"/>
<File RelativePath="..\.\src\medium\maxexp.h"/>
</Filter>
<Filter Name="mitsuba">
<File RelativePath="..\.\src\mitsuba\mitsuba.cpp"/>
<File RelativePath="..\.\src\mitsuba\mtssrv.cpp"/>
<File RelativePath="..\.\src\mitsuba\mtsutil.cpp"/>
</Filter>
<Filter Name="mtsgui">
<File RelativePath="..\.\src\mtsgui\aboutdlg.cpp"/>
<File RelativePath="..\.\src\mtsgui\aboutdlg.h"/>
<File RelativePath="..\.\src\mtsgui\acknowledgmentdlg.cpp"/>
<File RelativePath="..\.\src\mtsgui\acknowledgmentdlg.h"/>
<File RelativePath="..\.\src\mtsgui\addserverdlg.cpp"/>
<File RelativePath="..\.\src\mtsgui\addserverdlg.h"/>
<File RelativePath="..\.\src\mtsgui\common.h"/>
<File RelativePath="..\.\src\mtsgui\glwidget.cpp"/>
<File RelativePath="..\.\src\mtsgui\glwidget.h"/>
<File RelativePath="..\.\src\mtsgui\importdlg.cpp"/>
<File RelativePath="..\.\src\mtsgui\importdlg.h"/>
<File RelativePath="..\.\src\mtsgui\loaddlg.cpp"/>
<File RelativePath="..\.\src\mtsgui\loaddlg.h"/>
<File RelativePath="..\.\src\mtsgui\locateresourcedlg.cpp"/>
<File RelativePath="..\.\src\mtsgui\locateresourcedlg.h"/>
<File RelativePath="..\.\src\mtsgui\logwidget.cpp"/>
<File RelativePath="..\.\src\mtsgui\logwidget.h"/>
<File RelativePath="..\.\src\mtsgui\main.cpp"/>
<File RelativePath="..\.\src\mtsgui\mainwindow.cpp"/>
<File RelativePath="..\.\src\mtsgui\mainwindow.h"/>
<File RelativePath="..\.\src\mtsgui\preview.cpp"/>
<File RelativePath="..\.\src\mtsgui\preview.h"/>
<File RelativePath="..\.\src\mtsgui\previewsettingsdlg.cpp"/>
<File RelativePath="..\.\src\mtsgui\previewsettingsdlg.h"/>
<File RelativePath="..\.\src\mtsgui\previewsettingsdlg_cocoa.cpp"/>
<File RelativePath="..\.\src\mtsgui\previewsettingsdlg_cocoa.h"/>
<File RelativePath="..\.\src\mtsgui\preview_proc.cpp"/>
<File RelativePath="..\.\src\mtsgui\preview_proc.h"/>
<File RelativePath="..\.\src\mtsgui\programsettingsdlg.cpp"/>
<File RelativePath="..\.\src\mtsgui\programsettingsdlg.h"/>
<File RelativePath="..\.\src\mtsgui\rendersettingsdlg.cpp"/>
<File RelativePath="..\.\src\mtsgui\rendersettingsdlg.h"/>
<Filter Name="resources">
</Filter>
<File RelativePath="..\.\src\mtsgui\save.cpp"/>
<File RelativePath="..\.\src\mtsgui\save.h"/>
<File RelativePath="..\.\src\mtsgui\sceneimporter.cpp"/>
<File RelativePath="..\.\src\mtsgui\sceneimporter.h"/>
<File RelativePath="..\.\src\mtsgui\sceneinfodlg.cpp"/>
<File RelativePath="..\.\src\mtsgui\sceneinfodlg.h"/>
<File RelativePath="..\.\src\mtsgui\sceneloader.cpp"/>
<File RelativePath="..\.\src\mtsgui\sceneloader.h"/>
<File RelativePath="..\.\src\mtsgui\server.cpp"/>
<File RelativePath="..\.\src\mtsgui\server.h"/>
<File RelativePath="..\.\src\mtsgui\symlinks_auth.cpp"/>
<File RelativePath="..\.\src\mtsgui\symlinks_install.c"/>
<File RelativePath="..\.\src\mtsgui\tabbar.cpp"/>
<File RelativePath="..\.\src\mtsgui\tabbar.h"/>
<File RelativePath="..\.\src\mtsgui\updatedlg.cpp"/>
<File RelativePath="..\.\src\mtsgui\updatedlg.h"/>
<File RelativePath="..\.\src\mtsgui\upgrade.cpp"/>
<File RelativePath="..\.\src\mtsgui\upgrade.h"/>
<File RelativePath="..\.\src\mtsgui\xmltreemodel.cpp"/>
<File RelativePath="..\.\src\mtsgui\xmltreemodel.h"/>
</Filter>
<Filter Name="phase">
<File RelativePath="..\.\src\phase\hg.cpp"/>
<File RelativePath="..\.\src\phase\isotropic.cpp"/>
<File RelativePath="..\.\src\phase\kkay.cpp"/>
<File RelativePath="..\.\src\phase\microflake.cpp"/>
<File RelativePath="..\.\src\phase\microflake_fiber.h"/>
<File RelativePath="..\.\src\phase\mixturephase.cpp"/>
<File RelativePath="..\.\src\phase\rayleigh.cpp"/>
</Filter>
<Filter Name="rfilters">
<File RelativePath="..\.\src\rfilters\box.cpp"/>
<File RelativePath="..\.\src\rfilters\catmullrom.cpp"/>
<File RelativePath="..\.\src\rfilters\gaussian.cpp"/>
<File RelativePath="..\.\src\rfilters\mitchell.cpp"/>
<File RelativePath="..\.\src\rfilters\wsinc.cpp"/>
</Filter>
<Filter Name="samplers">
<File RelativePath="..\.\src\samplers\halton.cpp"/>
<File RelativePath="..\.\src\samplers\hammersley.cpp"/>
<File RelativePath="..\.\src\samplers\independent.cpp"/>
<File RelativePath="..\.\src\samplers\ldsampler.cpp"/>
<File RelativePath="..\.\src\samplers\stratified.cpp"/>
</Filter>
<Filter Name="shapes">
<File RelativePath="..\.\src\shapes\animatedinstance.cpp"/>
<File RelativePath="..\.\src\shapes\cylinder.cpp"/>
<File RelativePath="..\.\src\shapes\hair.cpp"/>
<File RelativePath="..\.\src\shapes\hair.h"/>
<File RelativePath="..\.\src\shapes\instance.cpp"/>
<File RelativePath="..\.\src\shapes\instance.h"/>
<File RelativePath="..\.\src\shapes\obj.cpp"/>
<Filter Name="ply">
<Filter Name="ply">
</Filter>
<File RelativePath="..\.\src\shapes\ply\ply.cpp"/>
<File RelativePath="..\.\src\shapes\ply\ply_parser.cpp"/>
</Filter>
<File RelativePath="..\.\src\shapes\serialized.cpp"/>
<File RelativePath="..\.\src\shapes\shapegroup.cpp"/>
<File RelativePath="..\.\src\shapes\shapegroup.h"/>
<File RelativePath="..\.\src\shapes\sphere.cpp"/>
</Filter>
<Filter Name="subsurface">
<File RelativePath="..\.\src\subsurface\adipole.cpp"/>
<File RelativePath="..\.\src\subsurface\dipole.cpp"/>
<File RelativePath="..\.\src\subsurface\irrproc.cpp"/>
<File RelativePath="..\.\src\subsurface\irrproc.h"/>
<File RelativePath="..\.\src\subsurface\irrtree.cpp"/>
<File RelativePath="..\.\src\subsurface\irrtree.h"/>
<File RelativePath="..\.\src\subsurface\marschner.cpp"/>
</Filter>
<Filter Name="tests">
<File RelativePath="..\.\src\tests\test_chisquare.cpp"/>
<File RelativePath="..\.\src\tests\test_kd.cpp"/>
<File RelativePath="..\.\src\tests\test_la.cpp"/>
<File RelativePath="..\.\src\tests\test_quad.cpp"/>
<File RelativePath="..\.\src\tests\test_samplers.cpp"/>
<File RelativePath="..\.\src\tests\test_sh.cpp"/>
<File RelativePath="..\.\src\tests\test_spectrum.cpp"/>
</Filter>
<Filter Name="textures">
<File RelativePath="..\.\src\textures\bitmap.cpp"/>
<File RelativePath="..\.\src\textures\checkerboard.cpp"/>
<File RelativePath="..\.\src\textures\gridtexture.cpp"/>
<File RelativePath="..\.\src\textures\scale.cpp"/>
<File RelativePath="..\.\src\textures\vertexcolors.cpp"/>
</Filter>
<Filter Name="utils">
<File RelativePath="..\.\src\utils\addimages.cpp"/>
<File RelativePath="..\.\src\utils\cylclip.cpp"/>
<File RelativePath="..\.\src\utils\joinrgb.cpp"/>
<File RelativePath="..\.\src\utils\kdbench.cpp"/>
<File RelativePath="..\.\src\utils\tonemap.cpp"/>
<File RelativePath="..\.\src\utils\ttest.cpp"/>
<File RelativePath="..\.\src\utils\uflakefit.cpp"/>
</Filter>
<Filter Name="volume">
<File RelativePath="..\.\src\volume\constvolume.cpp"/>
<File RelativePath="..\.\src\volume\gridvolume.cpp"/>
<File RelativePath="..\.\src\volume\hgridvolume.cpp"/>
<File RelativePath="..\.\src\volume\volcache.cpp"/>
</Filter>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,295 @@
# - Find COLLADA
# This module searches for the COLLADA library, by default using version 1.4
# of the COLLADA DOM Schema.
#
# The module defines the following variables:
# COLLADA_INCLUDE_DIRS - where to find dae.h, etc.
# COLLADA_LIBRARIES - the libraries needed to use COLLADA.
# COLLADA_DEFINITIONS - preprocessor definitions to use with COLLADA.
# COLLADA_NAMESPACE - boolean to indicate whether this version contains the
# namespaces and new functions introduced with
# COLLADA-DOM 2.4.
# COLLADA_NAMESPACE_141 - boolean to indicate wheter the namespace
# ColladaDOM141 is supported.
# COLLADA_NAMESPACE_150 - boolean to indicate wheter the namespace
# ColladaDOM150 is supported.
# COLLADA_FOUND - if false, do not try to use COLLADA.
#
# Variables used by this module, they can change the default behavior and need
# to be set before calling find_package:
#
# COLLADADOM_15 - if set to a value which evaluates to true, the module
# will look for the COLLADA DOM Scheva version 1.5
# components instead of the default (1.4.)
# COLLADA_ROOT_DIR - The prefered installation prefix for searching for
# COLLADA. This corresponds to
# ./configure --prefix=$COLLADA_ROOT_DIR
# Set if this module has problems finding the proper
# COLLADA instalation.
#
# ============================================================================
# Originally created by Robert Osfield. [OpenSceneGraph]
# ============================================================================
# Standarnd issue macros
include (FindPackageHandleStandardArgs)
include (FindPackageMessage)
include (FindReleaseAndDebug)
include (CheckCXXSourceCompiles)
if (COLLADA_15)
set (COLLADADOM_VERSION "15")
set (COLLADADOM_VERSION_PT "1.5")
else()
set (COLLADADOM_VERSION "14")
set (COLLADADOM_VERSION_PT "1.4")
endif()
set(COLLADA_VERSIONS "2.5" 25 "2.4" 24 23 22 21 20 2)
# Default search paths
set (COLLADA_generic_include_path
~/Library/Frameworks
/Library/Frameworks
/opt/local/Library/Frameworks #macports
/usr/local/include
/usr/local/include/colladadom
/usr/include/
/usr/include/colladadom
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/csw/include # Blastwave
/opt/include
/usr/freeware/include
)
set (COLLADA_generic_lib_path
/opt/local/Library/Frameworks #macports
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
/usr/freeware/lib
)
# Macro to assemble a helper state variable
macro (SET_STATE_VAR varname)
set (tmp_lst ColladaDOM | ${COLLADA_INCLUDE_DIR} | ${COLLADA_LIBRARY})
set (${varname} "${tmp_lst}")
unset (tmp_lst)
endmacro ()
# Macro to search for an include directory
macro (PREFIX_FIND_INCLUDE_DIR prefix includefile libpath_var)
string (TOUPPER ${prefix}_INCLUDE_DIR tmp_varname)
find_path(${tmp_varname} ${includefile}
HINTS ${${libpath_var}}
PATHS ${COLLADA_generic_include_path}
PATH_SUFFIXES
"collada-dom2.4" "collada_dom2.4"
"include/collada-dom2.4" "include/collada_dom2.4"
"collada-dom" "collada_dom" "include"
"include/collada-dom" "include/collada_dom"
)
if (${tmp_varname})
mark_as_advanced (${tmp_varname})
endif ()
unset (tmp_varname)
endmacro ()
# Macro to test for namespace support. Factorized just to keep the code cleaner
macro (COLLADA_CHECK_NAMESPACE)
# COLLADA-DOM 2.4 needs special treatment
set(_COLLADA_OLD_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS})
set(_COLLADA_OLD_INCLUDES ${CMAKE_REQUIRED_INCLUDES})
set(_COLLADA_OLD_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
# Flags for the test source:
# (1 << 0) - COLLADA-DOM 1.4.1
# (1 << 1) - COLLADA-DOM 1.5.0
set(_COLLADA_TEST_SRC "
#define NO_BOOST
#ifdef COLLADA_DOM_SUPPORT150
# undef COLLADA_DOM_SUPPORT150
#endif
#ifdef COLLADA_DOM_SUPPORT141
# undef COLLADA_DOM_SUPPORT141
#endif
#ifdef COLLADA_DOM_NAMESPACE
# undef COLLADA_DOM_NAMESPACE
#endif
#ifndef COLLADA_FLAGS
# define COLLADA_FLAGS 0
#endif
#define COLLADA_DOM_NAMESPACE
#if (COLLADA_FLAGS & (1 << 0)) != 0
# define COLLADA_DOM_SUPPORT141
#endif
#if (COLLADA_FLAGS & (1 << 1)) != 0
# define COLLADA_DOM_SUPPORT150
#endif
#include <dae.h>
int main(int argc, char** argv) {
DAE dae;
int result = 0;
#ifdef COLLADA_DOM_SUPPORT141
ColladaDOM141::domCOLLADA* root1 = dae.getRoot141(argv[0]);
result += ((int*)root1)[argc];
#endif
#ifdef COLLADA_DOM_SUPPORT150
ColladaDOM150::domCOLLADA* root2 = dae.getRoot150(argv[0]);
result += ((int*)root2)[argc];
#endif
return result;
}
")
# Run the tests
set(CMAKE_REQUIRED_INCLUDES ${COLLADA_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${COLLADA_LIBRARIES})
set(CMAKE_REQUIRED_DEFINITIONS "-DCOLLADA_FLAGS=3")
CHECK_CXX_SOURCE_COMPILES("${_COLLADA_TEST_SRC}" HAVE_COLLADA_DOM_141_150)
# Perhaps it was compiled with only one of the namespaces
if (NOT HAVE_COLLADA_DOM_141_150)
set(CMAKE_REQUIRED_DEFINITIONS "-DCOLLADA_FLAGS=1")
CHECK_CXX_SOURCE_COMPILES("${_COLLADA_TEST_SRC}" HAVE_COLLADA_DOM_141)
set(CMAKE_REQUIRED_DEFINITIONS "-DCOLLADA_FLAGS=2")
CHECK_CXX_SOURCE_COMPILES("${_COLLADA_TEST_SRC}" HAVE_COLLADA_DOM_150)
endif()
set(CMAKE_REQUIRED_DEFINITIONS ${_COLLADA_OLD_DEFINITIONS})
set(CMAKE_REQUIRED_INCLUDES ${_COLLADA_OLD_INCLUDES})
set(CMAKE_REQUIRED_LIBRARIES ${_COLLADA_OLD_LIBRARIES})
unset(_COLLADA_TEST_SRC)
unset(_COLLADA_OLD_INCLUDES)
unset(_COLLADA_OLD_LIBRARIES)
endmacro()
# Encode the current state of the external variables into a string
SET_STATE_VAR (COLLADA_CURRENT_STATE)
# If the state has changed, clear the cached variables
if (COLLADA_CACHED_STATE AND
NOT COLLADA_CACHED_STATE STREQUAL COLLADA_CURRENT_STATE)
foreach (libvar ${COLLADA_CACHED_VARS})
unset (${libvar} CACHE)
endforeach ()
endif ()
# Where to look for the libraries
if(APPLE)
set(COLLADA_BUILDNAME "mac")
elseif(MINGW)
set(COLLADA_BUILDNAME "mingw")
elseif(MSVC)
math(EXPR COLLADA_BUILDNAME "(${MSVC_VERSION} - 600) / 100")
set(COLLADA_BUILDNAME "vc${COLLADA_BUILDNAME}")
endif()
set(Collada_library_paths
${COLLADA_ROOT_DIR}
${COLLADA_ROOT_DIR}/lib
${COLLADA_ROOT_DIR}/build/${COLLADA_BUILDNAME}-${COLLADADOM_VERSION_PT}
)
# Construct the possible names for the DOM library
set(COLLADADOM_NAMES
collada-dom
collada${COLLADADOM_VERSION}dom
Collada${COLLADADOM_VERSION}Dom
)
if (MSVC)
set(COLLADADOM_NAMES ${COLLADADOM_NAMES}
libcollada-dom
libCollada${COLLADADOM_VERSION}Dom
libcollada${COLLADADOM_VERSION}dom
)
endif()
# Version suffixes for MSVC
if (MSVC)
math(EXPR VC_SUFFIX_A "(${MSVC_VERSION} - 600) / 10")
math(EXPR VC_SUFFIX_B "${VC_SUFFIX_A} / 10")
set(VC_SUFFIXES "vc${VC_SUFFIX_A}-mt" "vc${VC_SUFFIX_B}-mt"
"vc${VC_SUFFIX_A}" "vc${VC_SUFFIX_B}")
unset(VC_SUFFIX_A)
unset(VC_SUFFIX_B)
endif()
set(COLLADADOM_NAMES_BASE ${COLLADADOM_NAMES})
foreach(name ${COLLADADOM_NAMES_BASE})
foreach(version ${COLLADA_VERSIONS})
list(APPEND COLLADADOM_NAMES "${name}${version}-dp" "${name}${version}")
if(MSVC)
foreach(vc_suffix ${VC_SUFFIXES})
list(APPEND COLLADADOM_NAMES "${name}${version}-dp-${vc_suffix}"
"${name}${version}-${vc_suffix}")
endforeach()
endif()
endforeach()
endforeach()
unset(COLLADADOM_NAMES_BASE)
unset(VC_SUFFIXES)
# Locate the header files
PREFIX_FIND_INCLUDE_DIR (COLLADA dae.h COLLADA_ROOT_DIR)
# Locate the actual library
FIND_RELEASE_AND_DEBUG(COLLADA NAMES ${COLLADADOM_NAMES} DEFAULT_SUFFIXES
PATHS ${Collada_library_paths} ${COLLADA_generic_lib_path})
# Create the list of variables that might need to be cleared.
# The libraries and include path are not cleared since they might be manually
# set by the user. Besides they will be processed again if the user deletes
# them from the CMake cache. Only the internal cache variables need to be
# specifically cleared so that the tests run again.
set (COLLADA_CACHED_VARS
HAVE_COLLADA_DOM_141_150 HAVE_COLLADA_DOM_141 HAVE_COLLADA_DOM_150
CACHE INTERNAL "Variables set by FindCOLLADA.cmake" FORCE)
# Store the current state so that variables might be cleared if required
set (COLLADA_CACHED_STATE ${COLLADA_CURRENT_STATE}
CACHE INTERNAL "State last seen by FindCOLLADA.cmake" FORCE)
# Use the standard function to handle COLLADA_FOUND
FIND_PACKAGE_HANDLE_STANDARD_ARGS (COLLADA DEFAULT_MSG
COLLADA_INCLUDE_DIR COLLADA_LIBRARY)
# Set the uncached variables for the appropriate version
if (COLLADA_FOUND)
set(COLLADA_INCLUDE_DIRS
${COLLADA_INCLUDE_DIR}
${COLLADA_INCLUDE_DIR}/${COLLADADOM_VERSION_PT})
set(COLLADA_LIBRARIES ${COLLADA_LIBRARY})
# Check if this version of COLLADA-DOM contains namespaces introduced in v2.4
COLLADA_CHECK_NAMESPACE()
# Set the results and definitions
if (HAVE_COLLADA_DOM_141_150 OR HAVE_COLLADA_DOM_141 OR HAVE_COLLADA_DOM_150)
set(COLLADA_NAMESPACE ON)
# TODO Check if double support was actually enabled
set(COLLADA_DEFINITIONS "-DCOLLADA_DOM_NAMESPACE -DCOLLADA_DOM_DAEFLOAT_IS64")
if (HAVE_COLLADA_DOM_141_150 OR HAVE_COLLADA_DOM_141)
set(COLLADA_NAMESPACE_141 ON)
set(COLLADA_DEFINITIONS "${COLLADA_DEFINITIONS} -DCOLLADA_DOM_SUPPORT141")
endif()
if (HAVE_COLLADA_DOM_141_150 OR HAVE_COLLADA_DOM_150)
set(COLLADA_NAMESPACE_150 ON)
set(COLLADA_DEFINITIONS "${COLLADA_DEFINITIONS} -DCOLLADA_DOM_SUPPORT150")
endif()
else()
set(COLLADA_NAMESPACE OFF)
set(COLLADA_NAMESPACE_141 OFF)
set(COLLADA_NAMESPACE_150 OFF)
set(COLLADA_DEFINITIONS "")
endif()
endif()

View File

@ -0,0 +1,26 @@
# - Find Eigen
# This module searches for the Eigen C++ library.
#
# The module defines the following variables:
# Eigen_INCLUDE_DIR, where to find Eigen/Core, etc.
# Eigen_FOUND, if false, do not try to use EIGEN.
#
# Variables used by this module, they can change the default behavior and need
# to be set before calling find_package:
#
# EIGEN_ROOT_DIR - The prefered installation prefix when searching for Eigen
#
include(FindPackageHandleStandardArgs)
# Finds the include files directory
find_path(Eigen_INCLUDE_DIR Eigen/Core
HINTS "${EIGEN_ROOT_DIR}"
PATH_SUFFIXES "eigen3"
DOC "The directory where Eigen/Core resides"
)
if(Eigen_INCLUDE_DIR)
mark_as_advanced(Eigen_INCLUDE_DIR)
endif()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eigen DEFAULT_MSG Eigen_INCLUDE_DIR)

135
data/cmake/FindGLEW.cmake Normal file
View File

@ -0,0 +1,135 @@
# - Find GLEW
# Find the native GLEW includes and libraries.
# This module defines the following read-only variables:
# GLEW_INCLUDE_DIRS - where to find GL/glew.h, etc.
# GLEW_LIBRARIES - libraries to link against to use GLEW.
# GLEW_DEFINITIONS - compiler definitions necessary for using GLEW.
# GLEW_FOUND - if false, do not try to use GLEW.
#
# These variables alter the behavior of the module when defined before calling
# find_package(GLEW)
# GLEW_MX - Set to a value which evaluates to true to look for the
# multi-context version of GLEW
# GLEW_ROOT_DIR - Base location of the GLEW (e.g. where the files were
# unzipped.)
#
#=============================================================================
# Originally from:
# http://code.google.com/p/nvidia-texture-tools/source/browse/trunk/cmake/FindGLEW.cmake
#=============================================================================
# Additional modules
include(FindReleaseAndDebug)
include(FindPackageHandleStandardArgs)
include(CheckCSourceCompiles)
# First of all, GLEW depends on OpenGL
find_package(OpenGL REQUIRED)
if (NOT WIN32)
set (GLEW_generic_include_path "/usr/include" "/usr/local/include"
"/sw/include" "/opt/local/include")
set (GLEW_generic_lib_path
"/usr/lib" "/usr/local/lib" "/sw/lib" "/opt/local/lib")
else()
set (GLEW_generic_include_path "")
set (GLEW_generic_lib_path "")
endif()
# Build the names for the library
if (NOT DEFINED CMAKE_C_COMPILER_ID)
message (AUTHOR_WARNING
"The variable to check for the compiler ID has changed!")
endif()
if (MSVC OR (WIN32 AND CMAKE_C_COMPILER_ID MATCHES "Intel"))
set (GLEW_NAMES "glew32" "glew")
else()
set (GLEW_NAMES "GLEW" "glew")
endif()
# Assumes that GLEW_MX means that the library has the "mx" suffix
if (GLEW_MX)
set (GLEW_NAMES_MX "")
foreach(name ${GLEW_NAMES})
set(GLEW_NAMES_MX ${GLEW_NAMES_MX} "${name}mx")
endforeach()
set (GLEW_NAMES ${GLEW_NAMES_MX})
unset (GLEW_NAMES_MX)
endif()
# Finds the include files directory
if(NOT APPLE)
set(GLEW_BASE_DIR "GL")
else()
set(GLEW_BASE_DIR "OpenGL")
endif()
find_path(GLEW_INCLUDE_DIR ${GLEW_BASE_DIR}/glew.h
HINTS ${GLEW_ROOT_DIR}/include
PATHS ${GLEW_generic_include_path}
DOC "The directory where ${GLEW_BASE_DIR}/glew.h resides"
)
unset(GLEW_BASE_DIR)
if (GLEW_INCLUDE_DIR)
mark_as_advanced (GLEW_INCLUDE_DIR)
endif()
# Tries to find the required libraries
FIND_RELEASE_AND_DEBUG(GLEW NAMES ${GLEW_NAMES} DEFAULT_SUFFIXES
PATHS ${GLEW_ROOT_DIR}/lib ${GLEW_generic_lib_path})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLEW
DEFAULT_MSG GLEW_INCLUDE_DIR GLEW_LIBRARY)
if (GLEW_FOUND)
set (GLEW_LIBRARIES ${OPENGL_LIBRARIES} ${GLEW_LIBRARY})
set (GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
if (GLEW_MX)
set (GLEW_DEFINITIONS -DGLEW_MX)
else()
set (GLEW_DEFINITIONS "")
endif()
endif()
# On Windows, try to check if the library is static
if (GLEW_FOUND AND WIN32)
set (CMAKE_REQUIRED_DEFINITIONS_OLD ${CMAKE_REQUIRED_DEFINITIONS})
set (CMAKE_REQUIRED_INCLUDES_OLD ${CMAKE_REQUIRED_INCLUDES})
set (CMAKE_REQUIRED_LIBRARIES_OLD ${CMAKE_REQUIRED_LIBRARIES})
set (CMAKE_REQUIRED_DEFINITIONS ${GLEW_DEFINITIONS})
set (CMAKE_REQUIRED_INCLUDES ${GLEW_INCLUDE_DIRS})
set (CMAKE_REQUIRED_LIBRARIES ${GLEW_LIBRARIES})
CHECK_C_SOURCE_COMPILES("
#include <GL/glew.h>
#include <stdio.h>
int main(int argc, char **argv) {
puts(glewGetString(GLEW_VERSION));
return 0;
}
" GLEW_WIN_CFLAGS)
# If the test failed, check if it is static
if (NOT GLEW_WIN_CFLAGS)
CHECK_C_SOURCE_COMPILES("
#define GLEW_STATIC
#include <GL/glew.h>
#include <stdio.h>
int main(int argc, char **argv) {
puts(glewGetString(GLEW_VERSION));
return 0;
}
" GLEW_WIN_CFLAGS_STATIC)
if (GLEW_WIN_CFLAGS_STATIC)
set (GLEW_DEFINITIONS ${GLEW_DEFINITIONS} -DGLEW_STATIC)
else()
message(WARNING "Could not determine the compile flags for GLEW.")
endif()
endif()
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS_OLD})
set (CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_OLD})
set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_OLD})
unset (CMAKE_REQUIRED_DEFINITIONS_OLD)
unset (CMAKE_REQUIRED_INCLUDES_OLD)
unset (CMAKE_REQUIRED_LIBRARIES_OLD)
endif()

View File

@ -0,0 +1,176 @@
# - Find IlmBase
#
# This module will first look into the directories defined by the variables:
# ILMBASE_HOME, ILMBASE_VERSION, ILMBASE_LIB_AREA
#
# It also supports non-standard names for the library components.
#
# To use a custom IlmBase:
# - Set the variable ILMBASE_CUSTOM to True
# - Set the variable ILMBASE_CUSTOM_LIBRARIES to a list of the libraries to
# use, e.g. "SpiImath SpiHalf SpiIlmThread SpiIex"
#
# This module defines the following variables:
#
# ILMBASE_INCLUDE_DIRS - where to find half.h, IlmBaseConfig.h, etc.
# ILMBASE_LIBRARIES - list of libraries to link against when using IlmBase.
# ILMBASE_FOUND - True if IlmBase was found.
# Other standarnd issue macros
include (FindPackageHandleStandardArgs)
include (SelectLibraryConfigurations)
include (FindReleaseAndDebug)
# Macro to assemble a helper state variable
macro (SET_STATE_VAR varname)
set (tmp_ilmbaselibs ${ILMBASE_CUSTOM_LIBRARIES})
separate_arguments (tmp_ilmbaselibs)
set (tmp_lst
${ILMBASE_CUSTOM} | ${tmp_ilmbaselibs} |
${ILMBASE_HOME} | ${ILMBASE_VERSION} | ${ILMBASE_LIB_AREA}
)
set (${varname} "${tmp_lst}")
unset (tmp_ilmbaselibs)
unset (tmp_lst)
endmacro ()
# Macro to search for an include directory
macro (PREFIX_FIND_INCLUDE_DIR prefix includefile libpath_var)
string (TOUPPER ${prefix}_INCLUDE_DIR tmp_varname)
find_path(${tmp_varname} ${includefile}
HINTS ${${libpath_var}}
PATHS "/usr/include" "/usr/local/include" "/sw/include" "/opt/local/include"
PATH_SUFFIXES include
)
if (${tmp_varname})
mark_as_advanced (${tmp_varname})
endif ()
unset (tmp_varname)
endmacro ()
# Macro to search for the given library and adds the cached
# variable names to the specified list
macro (PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
string (TOUPPER ${prefix}_${libname} tmp_prefix)
FIND_RELEASE_AND_DEBUG (${tmp_prefix} NAMES ${libname} DEFAULT_SUFFIXES
PATHS ${${libpath_var}}
FIXED_PATHS "/usr/lib" "/usr/local/lib" "/sw/lib" "/opt/local/lib"
)
list (APPEND ${liblist_var} ${tmp_prefix}_LIBRARIES)
# Add to the list of variables which should be reset
list (APPEND ${cachelist_var}
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
unset (tmp_prefix)
endmacro ()
# Encode the current state of the external variables into a string
SET_STATE_VAR (ILMBASE_CURRENT_STATE)
# If the state has changed, clear the cached variables
if (ILMBASE_CACHED_STATE AND
NOT ILMBASE_CACHED_STATE STREQUAL ILMBASE_CURRENT_STATE)
foreach (libvar ${ILMBASE_CACHED_VARS})
unset (${libvar} CACHE)
endforeach ()
endif ()
if (ILMBASE_CUSTOM)
if (NOT ILMBASE_CUSTOM_LIBRARIES)
message (FATAL_ERROR "Custom IlmBase libraries requested but ILMBASE_CUSTOM_LIBRARIES is not set.")
endif()
set (IlmBase_Libraries ${ILMBASE_CUSTOM_LIBRARIES})
separate_arguments(IlmBase_Libraries)
else ()
set (IlmBase_Libraries Half Iex Imath IlmThread)
endif ()
# Search paths for the IlmBase files
if (ILMBASE_HOME)
if (ILMBASE_VERSION)
set (IlmBase_include_paths
${ILMBASE_HOME}/ilmbase-${ILMBASE_VERSION}/include
${ILMBASE_HOME}/include/ilmbase-${ILMBASE_VERSION})
set (IlmBase_library_paths
${ILMBASE_HOME}/ilmbase-${ILMBASE_VERSION}/lib)
endif()
list (APPEND IlmBase_include_paths ${ILMBASE_HOME}/include)
set (IlmBase_library_paths
${ILMBASE_HOME}/lib
${ILMBASE_HOME}/lib64
${ILMBASE_LIB_AREA}
${IlmBase_library_paths})
endif ()
# Locate the header files
PREFIX_FIND_INCLUDE_DIR (IlmBase
OpenEXR/IlmBaseConfig.h IlmBase_include_paths)
# If the headers were found, add its parent to the list of lib directories
if (ILMBASE_INCLUDE_DIR)
get_filename_component (tmp_extra_dir "${ILMBASE_INCLUDE_DIR}/../" ABSOLUTE)
list (APPEND IlmBase_library_paths ${tmp_extra_dir})
unset (tmp_extra_dir)
endif ()
# Locate the IlmBase libraries
set (IlmBase_libvars "")
set (IlmBase_cachevars "")
foreach (ilmbase_lib ${IlmBase_Libraries})
PREFIX_FIND_LIB (IlmBase ${ilmbase_lib}
IlmBase_library_paths IlmBase_libvars IlmBase_cachevars)
endforeach ()
# Create the list of variables that might need to be cleared
set (ILMBASE_CACHED_VARS
ILMBASE_INCLUDE_DIR ${IlmBase_cachevars}
CACHE INTERNAL "Variables set by FindIlmBase.cmake" FORCE)
# Store the current state so that variables might be cleared if required
set (ILMBASE_CACHED_STATE ${ILMBASE_CURRENT_STATE}
CACHE INTERNAL "State last seen by FindIlmBase.cmake" FORCE)
# Link with pthreads if required
if (NOT WIN32 AND EXISTS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h)
file (STRINGS ${ILMBASE_INCLUDE_DIR}/OpenEXR/IlmBaseConfig.h
ILMBASE_HAVE_PTHREAD
REGEX "^[ \\t]*#define[ \\t]+HAVE_PTHREAD[ \\t]1[ \\t]*\$"
)
if (ILMBASE_HAVE_PTHREAD)
find_package (Threads)
if (CMAKE_USE_PTHREADS_INIT)
set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT})
endif ()
endif ()
endif ()
# Use the standard function to handle ILMBASE_FOUND
FIND_PACKAGE_HANDLE_STANDARD_ARGS (IlmBase DEFAULT_MSG
ILMBASE_INCLUDE_DIR ${IlmBase_libvars})
if (ILMBASE_FOUND)
set (ILMBASE_LIBRARIES "")
foreach (tmplib ${IlmBase_libvars})
list (APPEND ILMBASE_LIBRARIES ${${tmplib}})
endforeach ()
list (APPEND ILMBASE_LIBRARIES ${ILMBASE_PTHREADS})
set (ILMBASE_INCLUDE_DIRS ${ILMBASE_INCLUDE_DIR})
if (EXISTS ${ILMBASE_INCLUDE_DIR}/OpenEXR)
list (APPEND ILMBASE_INCLUDE_DIRS ${ILMBASE_INCLUDE_DIR}/OpenEXR)
endif()
endif ()
# Unset the helper variables to avoid pollution
unset (ILMBASE_CURRENT_STATE)
unset (IlmBase_include_paths)
unset (IlmBase_library_paths)
unset (IlmBase_libvars)
unset (IlmBase_cachevars)
unset (ILMBASE_PTHREADS)

View File

@ -0,0 +1,160 @@
# - Find OpenEXR.
#
# This module will first look into the directories defined by the variables:
# OPENEXR_HOME, OPENEXR_VERSION, OPENEXR_LIB_AREA
# If OPENEXR_VERSION and ILMBASE_HOME are both defined, the later is
# also considered.
#
# It also supports non-standard names for the library components.
#
# To use a custom OpenEXR
# - Set the variable OPENEXR_CUSTOM to True
# - Set the variable OPENEXR_CUSTOM_LIBRARY to the name of the library to
# use, e.g. "SpiIlmImf"
#
# This module defines the following variables:
#
# OPENEXR_INCLUDE_DIRS - where to find ImfRgbaFile.h, OpenEXRConfig, etc.
# OPENEXR_LIBRARIES - list of libraries to link against when using OpenEXR.
# This list does NOT include the IlmBase libraries.
# These are defined by the FindIlmBase module.
# OPENEXR_FOUND - True if OpenEXR was found.
# Other standarnd issue macros
include (FindPackageHandleStandardArgs)
include (FindReleaseAndDebug)
# Macro to assemble a helper state variable
macro (SET_STATE_VAR varname)
set (tmp_lst
${OPENEXR_CUSTOM} | ${OPENEXR_CUSTOM_LIBRARY} |
${OPENEXR_HOME} | ${OPENEXR_VERSION} | ${OPENEXR_LIB_AREA}
)
set (${varname} "${tmp_lst}")
unset (tmp_lst)
endmacro ()
# Macro to search for an include directory
macro (PREFIX_FIND_INCLUDE_DIR prefix includefile libpath_var)
string (TOUPPER ${prefix}_INCLUDE_DIR tmp_varname)
find_path(${tmp_varname} ${includefile}
HINTS ${${libpath_var}}
PATHS "/usr/include" "/usr/local/include" "/sw/include" "/opt/local/include"
PATH_SUFFIXES include
)
if (${tmp_varname})
mark_as_advanced (${tmp_varname})
endif ()
unset (tmp_varname)
endmacro ()
# Macro to search for the given library and adds the cached
# variable names to the specified list
macro (PREFIX_FIND_LIB prefix libname libpath_var liblist_var cachelist_var)
string (TOUPPER ${prefix}_${libname} tmp_prefix)
FIND_RELEASE_AND_DEBUG (${tmp_prefix} NAMES ${libname} DEFAULT_SUFFIXES
PATHS ${${libpath_var}}
FIXED_PATHS "/usr/lib" "/usr/local/lib" "/sw/lib" "/opt/local/lib"
)
list (APPEND ${liblist_var} ${tmp_prefix}_LIBRARIES)
# Add to the list of variables which should be reset
list (APPEND ${cachelist_var}
${tmp_prefix}_LIBRARY
${tmp_prefix}_LIBRARY_RELEASE
${tmp_prefix}_LIBRARY_DEBUG)
unset (tmp_prefix)
endmacro ()
# Encode the current state of the external variables into a string
SET_STATE_VAR (OPENEXR_CURRENT_STATE)
# If the state has changed, clear the cached variables
if (OPENEXR_CACHED_STATE AND
NOT OPENEXR_CACHED_STATE STREQUAL OPENEXR_CURRENT_STATE)
foreach (libvar ${OPENEXR_CACHED_VARS})
unset (${libvar} CACHE)
endforeach ()
endif ()
if (OPENEXR_CUSTOM)
if (NOT OPENEXR_CUSTOM_LIBRARY)
message (FATAL_ERROR "Custom OpenEXR library requested but OPENEXR_CUSTOM_LIBRARY is not set.")
endif()
set (OpenEXR_Library ${OPENEXR_CUSTOM_LIBRARY})
else ()
set (OpenEXR_Library IlmImf)
endif ()
# Search paths for the OpenEXR files
if (OPENEXR_HOME)
set (OpenEXR_library_paths
${OPENEXR_HOME}/lib
${OPENEXR_HOME}/lib64)
if (OPENEXR_VERSION)
set (OpenEXR_include_paths
${OPENEXR_HOME}/openexr-${OPENEXR_VERSION}/include)
list (APPEND OpenEXR_library_paths
${OPENEXR_HOME}/openexr-${OPENEXR_VERSION}/lib)
endif()
list (APPEND OpenEXR_include_paths ${OPENEXR_HOME}/include)
if (OPENEXR_LIB_AREA)
list (INSERT OpenEXR_library_paths 2 ${OPENEXR_LIB_AREA})
endif ()
endif ()
if (ILMBASE_HOME AND OPENEXR_VERSION)
list (APPEND OpenEXR_include_paths
${ILMBASE_HOME}/include/openexr-${OPENEXR_VERSION})
endif()
# Locate the header files
PREFIX_FIND_INCLUDE_DIR (OpenEXR
OpenEXR/ImfRgbaFile.h OpenEXR_include_paths)
# If the headers were found, add its parent to the list of lib directories
if (OPENEXR_INCLUDE_DIR)
get_filename_component (tmp_extra_dir "${OPENEXR_INCLUDE_DIR}/../" ABSOLUTE)
list (APPEND OpenEXR_library_paths ${tmp_extra_dir})
unset (tmp_extra_dir)
endif ()
# Locate the OpenEXR library
set (OpenEXR_libvars "")
set (OpenEXR_cachevars "")
PREFIX_FIND_LIB (OpenEXR ${OpenEXR_Library}
OpenEXR_library_paths OpenEXR_libvars OpenEXR_cachevars)
# Create the list of variables that might need to be cleared
set (OPENEXR_CACHED_VARS
OPENEXR_INCLUDE_DIR ${OpenEXR_cachevars}
CACHE INTERNAL "Variables set by FindOpenEXR.cmake" FORCE)
# Store the current state so that variables might be cleared if required
set (OPENEXR_CACHED_STATE ${OPENEXR_CURRENT_STATE}
CACHE INTERNAL "State last seen by FindOpenEXR.cmake" FORCE)
# Use the standard function to handle OPENEXR_FOUND
FIND_PACKAGE_HANDLE_STANDARD_ARGS (OpenEXR DEFAULT_MSG
OPENEXR_INCLUDE_DIR ${OpenEXR_libvars})
if (OPENEXR_FOUND)
set (OPENEXR_LIBRARIES "")
foreach (tmplib ${OpenEXR_libvars})
list (APPEND OPENEXR_LIBRARIES ${${tmplib}})
endforeach ()
set (OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR})
if (EXISTS ${OPENEXR_INCLUDE_DIR}/OpenEXR)
list (APPEND OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR}/OpenEXR)
endif()
endif ()
# Unset the helper variables to avoid pollution
unset (OPENEXR_CURRENT_STATE)
unset (OpenEXR_include_paths)
unset (OpenEXR_library_paths)
unset (OpenEXR_libvars)
unset (OpenEXR_cachevars)

View File

@ -0,0 +1,132 @@
# - Finds both release and debug versions of a library
#
# FIND_RELEASE_AND_DEBUG(<prefix> NAMES <library names>
# [DEFAULT_SUFFIXES | DBG_SUFFIXES <suffixes> ]
# [PATHS <search paths>] [FIXED_PATHS <fixed paths>])
#
# Helps in finding distinct release and debug versions of a library so that
# the appropriate version is selected according to the build configuration.
# Assumes that the name of the debug version is that of the release version
# plus a certain suffix such as "_debug". The effective set of names used
# to find the debug version is the cartesian product of the library's names
# and the debug suffixes.
#
# Requires the CMake modules SelectLibraryConfigurations (introduced in CMake
# 2.8.0) and CMakeParseArguments (introduced in CMake 2.8.3).
#
# Macro arguments:
# <prefix> - A prefix for the variables that will be generated.
# <library names> - non-empty list with the possible names for a library.
# DEFAULT_SUFFIXES - use the default list of suffixes for finding the debug
# libraries. The suffixes are: -d, -debug, d, _d, debug
# <suffixes> - custom non-empty list with specific debug suffixes.
# <search paths> - optional list with additional path in which the libraries
# will be search. By default the "lib" suffix for each path
# is also searched.
# <fixed paths> - optional list with fixed path guesses (i.e. those which
# are baked-in into the CMake file.) If the paths contain
# variables which may change at runtime, they should be
# specified as <search paths> instead.
#
# This macro will generate the following advanced variables:
# <prefix>_LIBRARY_RELEASE - the release version of the library
# <prefix>_LIBRARY_DEBUG - the debug version of the library
# <prefix>_LIBRARY, <prefix>_LIBRARIES - set according to the CMake macro
# select_library_configurations(...)
#
# A minimal example, to look for the library "foo" using the default debug
# suffixes:
# FIND_RELEASE_AND_DEBUG(FOO NAMES foo DEFAULT_SUFFIXES)
#
# Search for the "foo" library with custom names and suffixes. In this example
# the release version can be either "foo" or "myfoo". The actual debug version
# searched is one of "foo-d", "myfoo-d", "foo-dbg" or "myfoo-dbg". The paths
# "/path1" and "/path2/foo" are also searched.
# FIND_RELEASE_AND_DEBUG(FOO NAMES foo myfoo DBG_SUFFIXES -d -dbg PATHS /path1 /path2/foo)
#
#=============================================================================
# Edgar Velázquez-Armendáriz, Cornell University (cs.cornell.edu - eva5)
# Distributed under the OSI-approved MIT License (the "License")
#
# Copyright (c) 2008-2011 Program of Computer Graphics, Cornell University
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#=============================================================================
include(SelectLibraryConfigurations)
include(CMakeParseArguments)
macro(FIND_RELEASE_AND_DEBUG)
# Parse the options. The syntax of the macro is:
# CMAKE_PARSE_ARGUMENTS(<prefix> <options> <one_value_keywords> <multi_value_keywords> args...)
CMAKE_PARSE_ARGUMENTS(LIBRELDBG "DEFAULT_SUFFIXES" "DBG_SUFFIXES"
"NAMES;PATHS;FIXED_PATHS" ${ARGN})
# Verify that everything makes sense
if (LIBRELDBG_UNPARSED_ARGUMENTS)
list(GET LIBRELDBG_UNPARSED_ARGUMENTS 0 LIBPREFIX)
list(LENGTH LIBRELDBG_UNPARSED_ARGUMENTS _len)
if (NOT ${_len} EQUAL 1)
message(WARNING "Too many arguments, prefix assumed to be \"${LIBPREFIX}\"")
endif()
else()
message(SEND_ERROR "Missing library prefix")
endif()
unset(_len)
if (NOT LIBRELDBG_NAMES)
message(FATAL_ERROR "Missing library names")
endif()
if (LIBRELDBG_DEFAULT_SUFFIXES)
set(LIBRELDBG_DBG_SUFFIXES "-d" "-debug" "d" "_d" "_debug")
elseif(NOT LIBRELDBG_DBG_SUFFIXES)
message(FATAL_ERROR "Missing custom debug suffixes")
endif()
# List with the debug suffixes to use
# Construct the possible debug names {names}x{suffixes}
set(LIBRELDBG_NAMES_DEBUG "")
foreach(suffix ${LIBRELDBG_DBG_SUFFIXES})
foreach(name ${LIBRELDBG_NAMES})
set(LIBRELDBG_NAMES_DEBUG ${LIBRELDBG_NAMES_DEBUG} "${name}${suffix}")
endforeach()
endforeach()
find_library(${LIBPREFIX}_LIBRARY_RELEASE
NAMES ${LIBRELDBG_NAMES}
HINTS ${LIBRELDBG_PATHS}
PATHS ${LIBRELDBG_FIXED_PATHS}
PATH_SUFFIXES lib
)
find_library(${LIBPREFIX}_LIBRARY_DEBUG
NAMES ${LIBRELDBG_NAMES_DEBUG}
HINTS ${LIBRELDBG_PATHS}
PATHS ${LIBRELDBG_FIXED_PATHS}
PATH_SUFFIXES lib
)
SELECT_LIBRARY_CONFIGURATIONS(${LIBPREFIX})
# We don't want to pollute the gui with non-user friendly entries
mark_as_advanced(${LIBPREFIX}_RELEASE ${LIBPREFIX}_DEBUG)
endmacro()

494
data/cmake/FindX11.cmake Normal file
View File

@ -0,0 +1,494 @@
# - Find X11 installation
# Try to find X11 on UNIX systems. The following values are defined
# X11_FOUND - True if X11 is available
# X11_INCLUDE_DIR - include directories to use X11
# X11_LIBRARIES - link against these to use X11
#
# and also the following more fine grained variables:
# Include paths: X11_ICE_INCLUDE_PATH, X11_ICE_LIB, X11_ICE_FOUND
# X11_X11_INCLUDE_PATH, X11_X11_LIB
# X11_Xaccessrules_INCLUDE_PATH, X11_Xaccess_FOUND
# X11_Xaccessstr_INCLUDE_PATH, X11_Xaccess_FOUND
# X11_Xau_INCLUDE_PATH, X11_Xau_LIB, X11_Xau_FOUND
# X11_Xcomposite_INCLUDE_PATH, X11_Xcomposite_LIB, X11_Xcomposite_FOUND
# X11_Xcursor_INCLUDE_PATH, X11_Xcursor_LIB, X11_Xcursor_FOUND
# X11_Xdamage_INCLUDE_PATH, X11_Xdamage_LIB, X11_Xdamage_FOUND
# X11_Xdmcp_INCLUDE_PATH, X11_Xdmcp_LIB, X11_Xdmcp_FOUND
# X11_Xext_LIB, X11_Xext_FOUND
# X11_dpms_INCLUDE_PATH, (in X11_Xext_LIB), X11_dpms_FOUND
# X11_XShm_INCLUDE_PATH, (in X11_Xext_LIB), X11_XShm_FOUND
# X11_Xshape_INCLUDE_PATH, (in X11_Xext_LIB), X11_Xshape_FOUND
# X11_xf86misc_INCLUDE_PATH, X11_Xxf86misc_LIB, X11_xf86misc_FOUND
# X11_xf86vmode_INCLUDE_PATH, X11_Xxf86vm_LIB X11_xf86vmode_FOUND
# X11_Xfixes_INCLUDE_PATH, X11_Xfixes_LIB, X11_Xfixes_FOUND
# X11_Xft_INCLUDE_PATH, X11_Xft_LIB, X11_Xft_FOUND
# X11_Xi_INCLUDE_PATH, X11_Xi_LIB, X11_Xi_FOUND
# X11_Xinerama_INCLUDE_PATH, X11_Xinerama_LIB, X11_Xinerama_FOUND
# X11_Xinput_INCLUDE_PATH, X11_Xinput_LIB, X11_Xinput_FOUND
# X11_Xkb_INCLUDE_PATH, X11_Xkb_FOUND
# X11_Xkblib_INCLUDE_PATH, X11_Xkb_FOUND
# X11_Xpm_INCLUDE_PATH, X11_Xpm_LIB, X11_Xpm_FOUND
# X11_XTest_INCLUDE_PATH, X11_XTest_LIB, X11_XTest_FOUND
# X11_Xrandr_INCLUDE_PATH, X11_Xrandr_LIB, X11_Xrandr_FOUND
# X11_Xrender_INCLUDE_PATH, X11_Xrender_LIB, X11_Xrender_FOUND
# X11_Xscreensaver_INCLUDE_PATH, X11_Xscreensaver_LIB, X11_Xscreensaver_FOUND
# X11_Xt_INCLUDE_PATH, X11_Xt_LIB, X11_Xt_FOUND
# X11_Xutil_INCLUDE_PATH, X11_Xutil_FOUND
# X11_Xv_INCLUDE_PATH, X11_Xv_LIB, X11_Xv_FOUND
#=============================================================================
# Copyright 2007-2009 Kitware, Inc.
#
# CMake - Cross Platform Makefile Generator
# Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
# nor the names of their contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# ----------------------------------------------------------------------------
#
# The above copyright and license notice applies to distributions of
# CMake in source and binary form. Some source files contain additional
# notices of original copyright by their contributors; see each source
# for details. Third-party software packages supplied with CMake under
# compatible licenses provide their own copyright notices documented in
# corresponding subdirectories.
#
# ----------------------------------------------------------------------------
#
# CMake was initially developed by Kitware with the following sponsorship:
#
# * National Library of Medicine at the National Institutes of Health
# as part of the Insight Segmentation and Registration Toolkit (ITK).
#
# * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
# Visualization Initiative.
#
# * National Alliance for Medical Image Computing (NAMIC) is funded by the
# National Institutes of Health through the NIH Roadmap for Medical
# Research, Grant U54 EB005149.
#
#=============================================================================
IF (UNIX)
SET(X11_FOUND 0)
# X11 is never a framework and some header files may be
# found in tcl on the mac
SET(CMAKE_FIND_FRAMEWORK_SAVE ${CMAKE_FIND_FRAMEWORK})
SET(CMAKE_FIND_FRAMEWORK NEVER)
SET(X11_INC_SEARCH_PATH
/usr/pkg/xorg/include
/usr/X11R6/include
/usr/X11R7/include
/usr/include/X11
/usr/openwin/include
/usr/openwin/share/include
/opt/graphics/OpenGL/include
)
SET(X11_LIB_SEARCH_PATH
/usr/pkg/xorg/lib
/usr/X11R6/lib
/usr/X11R7/lib
/usr/openwin/lib
)
FIND_PATH(X11_X11_INCLUDE_PATH X11/X.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xlib_INCLUDE_PATH X11/Xlib.h ${X11_INC_SEARCH_PATH})
# Look for includes; keep the list sorted by name of the cmake *_INCLUDE_PATH
# variable (which doesn't need to match the include file name).
# Solaris lacks XKBrules.h, so we should skip kxkbd there.
FIND_PATH(X11_ICE_INCLUDE_PATH X11/ICE/ICE.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xaccessrules_INCLUDE_PATH X11/extensions/XKBrules.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xaccessstr_INCLUDE_PATH X11/extensions/XKBstr.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xau_INCLUDE_PATH X11/Xauth.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xcomposite_INCLUDE_PATH X11/extensions/Xcomposite.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xcursor_INCLUDE_PATH X11/Xcursor/Xcursor.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xdamage_INCLUDE_PATH X11/extensions/Xdamage.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xdmcp_INCLUDE_PATH X11/Xdmcp.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_dpms_INCLUDE_PATH X11/extensions/dpms.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_xf86misc_INCLUDE_PATH X11/extensions/xf86misc.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_xf86vmode_INCLUDE_PATH X11/extensions/xf86vmode.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xfixes_INCLUDE_PATH X11/extensions/Xfixes.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xft_INCLUDE_PATH X11/Xft/Xft.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xi_INCLUDE_PATH X11/extensions/XInput.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xinerama_INCLUDE_PATH X11/extensions/Xinerama.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xinput_INCLUDE_PATH X11/extensions/XInput.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xkb_INCLUDE_PATH X11/extensions/XKB.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xkblib_INCLUDE_PATH X11/XKBlib.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xpm_INCLUDE_PATH X11/xpm.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_XTest_INCLUDE_PATH X11/extensions/XTest.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_XShm_INCLUDE_PATH X11/extensions/XShm.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xrandr_INCLUDE_PATH X11/extensions/Xrandr.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xrender_INCLUDE_PATH X11/extensions/Xrender.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xscreensaver_INCLUDE_PATH X11/extensions/scrnsaver.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xshape_INCLUDE_PATH X11/extensions/shape.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xutil_INCLUDE_PATH X11/Xutil.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xt_INCLUDE_PATH X11/Intrinsic.h ${X11_INC_SEARCH_PATH})
FIND_PATH(X11_Xv_INCLUDE_PATH X11/extensions/Xvlib.h ${X11_INC_SEARCH_PATH})
FIND_LIBRARY(X11_X11_LIB X11 ${X11_LIB_SEARCH_PATH})
# Find additional X libraries. Keep list sorted by library name.
FIND_LIBRARY(X11_ICE_LIB ICE ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_SM_LIB SM ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xau_LIB Xau ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xcomposite_LIB Xcomposite ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xcursor_LIB Xcursor ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xdamage_LIB Xdamage ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xdmcp_LIB Xdmcp ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xext_LIB Xext ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xfixes_LIB Xfixes ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xft_LIB Xft ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xi_LIB Xi ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xinerama_LIB Xinerama ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xinput_LIB Xi ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xpm_LIB Xpm ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xrandr_LIB Xrandr ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xscreensaver_LIB Xss ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xt_LIB Xt ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_XTest_LIB Xtst ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xv_LIB Xv ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xxf86misc_LIB Xxf86misc ${X11_LIB_SEARCH_PATH})
FIND_LIBRARY(X11_Xxf86vm_LIB Xxf86vm ${X11_LIB_SEARCH_PATH})
SET(X11_LIBRARY_DIR "")
IF(X11_X11_LIB)
GET_FILENAME_COMPONENT(X11_LIBRARY_DIR ${X11_X11_LIB} PATH)
ENDIF(X11_X11_LIB)
SET(X11_INCLUDE_DIR) # start with empty list
IF(X11_X11_INCLUDE_PATH)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_X11_INCLUDE_PATH})
ENDIF(X11_X11_INCLUDE_PATH)
IF(X11_Xlib_INCLUDE_PATH)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xlib_INCLUDE_PATH})
ENDIF(X11_Xlib_INCLUDE_PATH)
IF(X11_Xutil_INCLUDE_PATH)
SET(X11_Xutil_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xutil_INCLUDE_PATH})
ENDIF(X11_Xutil_INCLUDE_PATH)
IF(X11_Xshape_INCLUDE_PATH)
SET(X11_Xshape_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xshape_INCLUDE_PATH})
ENDIF(X11_Xshape_INCLUDE_PATH)
SET(X11_LIBRARIES) # start with empty list
IF(X11_X11_LIB)
SET(X11_LIBRARIES ${X11_LIBRARIES} ${X11_X11_LIB})
ENDIF(X11_X11_LIB)
IF(X11_Xext_LIB)
SET(X11_Xext_FOUND TRUE)
SET(X11_LIBRARIES ${X11_LIBRARIES} ${X11_Xext_LIB})
ENDIF(X11_Xext_LIB)
IF(X11_Xt_LIB AND X11_Xt_INCLUDE_PATH)
SET(X11_Xt_FOUND TRUE)
ENDIF(X11_Xt_LIB AND X11_Xt_INCLUDE_PATH)
IF(X11_Xft_LIB AND X11_Xft_INCLUDE_PATH)
SET(X11_Xft_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xft_INCLUDE_PATH})
ENDIF(X11_Xft_LIB AND X11_Xft_INCLUDE_PATH)
IF(X11_Xv_LIB AND X11_Xv_INCLUDE_PATH)
SET(X11_Xv_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xv_INCLUDE_PATH})
ENDIF(X11_Xv_LIB AND X11_Xv_INCLUDE_PATH)
IF (X11_Xau_LIB AND X11_Xau_INCLUDE_PATH)
SET(X11_Xau_FOUND TRUE)
ENDIF (X11_Xau_LIB AND X11_Xau_INCLUDE_PATH)
IF (X11_Xdmcp_INCLUDE_PATH AND X11_Xdmcp_LIB)
SET(X11_Xdmcp_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xdmcp_INCLUDE_PATH})
ENDIF (X11_Xdmcp_INCLUDE_PATH AND X11_Xdmcp_LIB)
IF (X11_Xaccessrules_INCLUDE_PATH AND X11_Xaccessstr_INCLUDE_PATH)
SET(X11_Xaccess_FOUND TRUE)
SET(X11_Xaccess_INCLUDE_PATH ${X11_Xaccessstr_INCLUDE_PATH})
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xaccess_INCLUDE_PATH})
ENDIF (X11_Xaccessrules_INCLUDE_PATH AND X11_Xaccessstr_INCLUDE_PATH)
IF (X11_Xpm_INCLUDE_PATH AND X11_Xpm_LIB)
SET(X11_Xpm_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xpm_INCLUDE_PATH})
ENDIF (X11_Xpm_INCLUDE_PATH AND X11_Xpm_LIB)
IF (X11_Xcomposite_INCLUDE_PATH AND X11_Xcomposite_LIB)
SET(X11_Xcomposite_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xcomposite_INCLUDE_PATH})
ENDIF (X11_Xcomposite_INCLUDE_PATH AND X11_Xcomposite_LIB)
IF (X11_Xdamage_INCLUDE_PATH AND X11_Xdamage_LIB)
SET(X11_Xdamage_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xdamage_INCLUDE_PATH})
ENDIF (X11_Xdamage_INCLUDE_PATH AND X11_Xdamage_LIB)
IF (X11_XShm_INCLUDE_PATH)
SET(X11_XShm_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XShm_INCLUDE_PATH})
ENDIF (X11_XShm_INCLUDE_PATH)
IF (X11_XTest_INCLUDE_PATH AND X11_XTest_LIB)
SET(X11_XTest_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XTest_INCLUDE_PATH})
ENDIF (X11_XTest_INCLUDE_PATH AND X11_XTest_LIB)
IF (X11_Xi_INCLUDE_PATH AND X11_Xi_LIB)
SET(X11_Xi_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xi_INCLUDE_PATH})
ENDIF (X11_Xi_INCLUDE_PATH AND X11_Xi_LIB)
IF (X11_Xinerama_INCLUDE_PATH AND X11_Xinerama_LIB)
SET(X11_Xinerama_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xinerama_INCLUDE_PATH})
ENDIF (X11_Xinerama_INCLUDE_PATH AND X11_Xinerama_LIB)
IF (X11_Xfixes_INCLUDE_PATH AND X11_Xfixes_LIB)
SET(X11_Xfixes_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xfixes_INCLUDE_PATH})
ENDIF (X11_Xfixes_INCLUDE_PATH AND X11_Xfixes_LIB)
IF (X11_Xrender_INCLUDE_PATH AND X11_Xrender_LIB)
SET(X11_Xrender_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xrender_INCLUDE_PATH})
ENDIF (X11_Xrender_INCLUDE_PATH AND X11_Xrender_LIB)
IF (X11_Xrandr_INCLUDE_PATH AND X11_Xrandr_LIB)
SET(X11_Xrandr_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xrandr_INCLUDE_PATH})
ENDIF (X11_Xrandr_INCLUDE_PATH AND X11_Xrandr_LIB)
IF (X11_xf86misc_INCLUDE_PATH AND X11_Xxf86misc_LIB)
SET(X11_xf86misc_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_xf86misc_INCLUDE_PATH})
ENDIF (X11_xf86misc_INCLUDE_PATH AND X11_Xxf86misc_LIB)
IF (X11_xf86vmode_INCLUDE_PATH AND X11_Xxf86vm_LIB)
SET(X11_xf86vmode_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_xf86vmode_INCLUDE_PATH})
ENDIF (X11_xf86vmode_INCLUDE_PATH AND X11_Xxf86vm_LIB)
IF (X11_Xcursor_INCLUDE_PATH AND X11_Xcursor_LIB)
SET(X11_Xcursor_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xcursor_INCLUDE_PATH})
ENDIF (X11_Xcursor_INCLUDE_PATH AND X11_Xcursor_LIB)
IF (X11_Xscreensaver_INCLUDE_PATH AND X11_Xscreensaver_LIB)
SET(X11_Xscreensaver_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xscreensaver_INCLUDE_PATH})
ENDIF (X11_Xscreensaver_INCLUDE_PATH AND X11_Xscreensaver_LIB)
IF (X11_dpms_INCLUDE_PATH)
SET(X11_dpms_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_dpms_INCLUDE_PATH})
ENDIF (X11_dpms_INCLUDE_PATH)
IF (X11_Xkb_INCLUDE_PATH AND X11_Xkblib_INCLUDE_PATH AND X11_Xlib_INCLUDE_PATH)
SET(X11_Xkb_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xkb_INCLUDE_PATH} )
ENDIF (X11_Xkb_INCLUDE_PATH AND X11_Xkblib_INCLUDE_PATH AND X11_Xlib_INCLUDE_PATH)
IF (X11_Xinput_INCLUDE_PATH AND X11_Xinput_LIB)
SET(X11_Xinput_FOUND TRUE)
SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xinput_INCLUDE_PATH})
ENDIF (X11_Xinput_INCLUDE_PATH AND X11_Xinput_LIB)
IF(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH)
SET(X11_ICE_FOUND TRUE)
ENDIF(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH)
# Deprecated variable for backwards compatibility with CMake 1.4
IF (X11_X11_INCLUDE_PATH AND X11_LIBRARIES)
SET(X11_FOUND 1)
ENDIF (X11_X11_INCLUDE_PATH AND X11_LIBRARIES)
IF(X11_FOUND)
INCLUDE(CheckFunctionExists)
INCLUDE(CheckLibraryExists)
# Translated from an autoconf-generated configure script.
# See libs.m4 in autoconf's m4 directory.
IF($ENV{ISC} MATCHES "^yes$")
SET(X11_X_EXTRA_LIBS -lnsl_s -linet)
ELSE($ENV{ISC} MATCHES "^yes$")
SET(X11_X_EXTRA_LIBS "")
# See if XOpenDisplay in X11 works by itself.
CHECK_LIBRARY_EXISTS("${X11_LIBRARIES}" "XOpenDisplay" "${X11_LIBRARY_DIR}" X11_LIB_X11_SOLO)
IF(NOT X11_LIB_X11_SOLO)
# Find library needed for dnet_ntoa.
CHECK_LIBRARY_EXISTS("dnet" "dnet_ntoa" "" X11_LIB_DNET_HAS_DNET_NTOA)
IF (X11_LIB_DNET_HAS_DNET_NTOA)
SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -ldnet)
ELSE (X11_LIB_DNET_HAS_DNET_NTOA)
CHECK_LIBRARY_EXISTS("dnet_stub" "dnet_ntoa" "" X11_LIB_DNET_STUB_HAS_DNET_NTOA)
IF (X11_LIB_DNET_STUB_HAS_DNET_NTOA)
SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -ldnet_stub)
ENDIF (X11_LIB_DNET_STUB_HAS_DNET_NTOA)
ENDIF (X11_LIB_DNET_HAS_DNET_NTOA)
ENDIF(NOT X11_LIB_X11_SOLO)
# Find library needed for gethostbyname.
CHECK_FUNCTION_EXISTS("gethostbyname" CMAKE_HAVE_GETHOSTBYNAME)
IF(NOT CMAKE_HAVE_GETHOSTBYNAME)
CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
IF (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lnsl)
ELSE (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
CHECK_LIBRARY_EXISTS("bsd" "gethostbyname" "" CMAKE_LIB_BSD_HAS_GETHOSTBYNAME)
IF (CMAKE_LIB_BSD_HAS_GETHOSTBYNAME)
SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lbsd)
ENDIF (CMAKE_LIB_BSD_HAS_GETHOSTBYNAME)
ENDIF (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME)
ENDIF(NOT CMAKE_HAVE_GETHOSTBYNAME)
# Find library needed for connect.
CHECK_FUNCTION_EXISTS("connect" CMAKE_HAVE_CONNECT)
IF(NOT CMAKE_HAVE_CONNECT)
CHECK_LIBRARY_EXISTS("socket" "connect" "" CMAKE_LIB_SOCKET_HAS_CONNECT)
IF (CMAKE_LIB_SOCKET_HAS_CONNECT)
SET (X11_X_EXTRA_LIBS -lsocket ${X11_X_EXTRA_LIBS})
ENDIF (CMAKE_LIB_SOCKET_HAS_CONNECT)
ENDIF(NOT CMAKE_HAVE_CONNECT)
# Find library needed for remove.
CHECK_FUNCTION_EXISTS("remove" CMAKE_HAVE_REMOVE)
IF(NOT CMAKE_HAVE_REMOVE)
CHECK_LIBRARY_EXISTS("posix" "remove" "" CMAKE_LIB_POSIX_HAS_REMOVE)
IF (CMAKE_LIB_POSIX_HAS_REMOVE)
SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lposix)
ENDIF (CMAKE_LIB_POSIX_HAS_REMOVE)
ENDIF(NOT CMAKE_HAVE_REMOVE)
# Find library needed for shmat.
CHECK_FUNCTION_EXISTS("shmat" CMAKE_HAVE_SHMAT)
IF(NOT CMAKE_HAVE_SHMAT)
CHECK_LIBRARY_EXISTS("ipc" "shmat" "" CMAKE_LIB_IPS_HAS_SHMAT)
IF (CMAKE_LIB_IPS_HAS_SHMAT)
SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lipc)
ENDIF (CMAKE_LIB_IPS_HAS_SHMAT)
ENDIF(NOT CMAKE_HAVE_SHMAT)
ENDIF($ENV{ISC} MATCHES "^yes$")
IF (X11_ICE_FOUND)
CHECK_LIBRARY_EXISTS("ICE" "IceConnectionNumber" "${X11_LIBRARY_DIR}"
CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER)
IF(CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER)
SET (X11_X_PRE_LIBS ${X11_ICE_LIB})
IF(X11_SM_LIB)
SET (X11_X_PRE_LIBS ${X11_SM_LIB} ${X11_X_PRE_LIBS})
ENDIF(X11_SM_LIB)
ENDIF(CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER)
ENDIF (X11_ICE_FOUND)
# Build the final list of libraries.
SET(X11_LIBRARIES ${X11_X_PRE_LIBS} ${X11_LIBRARIES} ${X11_X_EXTRA_LIBS})
INCLUDE(FindPackageMessage)
FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}"
"[${X11_X11_LIB}][${X11_INCLUDE_DIR}]")
ELSE (X11_FOUND)
IF (X11_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find X11")
ENDIF (X11_FIND_REQUIRED)
ENDIF (X11_FOUND)
MARK_AS_ADVANCED(
X11_X11_INCLUDE_PATH
X11_X11_LIB
X11_Xext_LIB
X11_Xau_LIB
X11_Xau_INCLUDE_PATH
X11_Xlib_INCLUDE_PATH
X11_Xutil_INCLUDE_PATH
X11_Xcomposite_INCLUDE_PATH
X11_Xcomposite_LIB
X11_Xaccess_INCLUDE_PATH
X11_Xfixes_LIB
X11_Xfixes_INCLUDE_PATH
X11_Xrandr_LIB
X11_Xrandr_INCLUDE_PATH
X11_Xdamage_LIB
X11_Xdamage_INCLUDE_PATH
X11_Xrender_LIB
X11_Xrender_INCLUDE_PATH
X11_Xxf86misc_LIB
X11_Xxf86vm_LIB
X11_xf86misc_INCLUDE_PATH
X11_xf86vmode_INCLUDE_PATH
X11_Xi_LIB
X11_Xi_INCLUDE_PATH
X11_Xinerama_LIB
X11_Xinerama_INCLUDE_PATH
X11_XTest_LIB
X11_XTest_INCLUDE_PATH
X11_Xcursor_LIB
X11_Xcursor_INCLUDE_PATH
X11_dpms_INCLUDE_PATH
X11_Xt_LIB
X11_Xt_INCLUDE_PATH
X11_Xdmcp_LIB
X11_LIBRARIES
X11_Xaccessrules_INCLUDE_PATH
X11_Xaccessstr_INCLUDE_PATH
X11_Xdmcp_INCLUDE_PATH
X11_Xkb_INCLUDE_PATH
X11_Xkblib_INCLUDE_PATH
X11_Xscreensaver_INCLUDE_PATH
X11_Xscreensaver_LIB
X11_Xpm_INCLUDE_PATH
X11_Xpm_LIB
X11_Xinput_LIB
X11_Xinput_INCLUDE_PATH
X11_Xft_LIB
X11_Xft_INCLUDE_PATH
X11_Xshape_INCLUDE_PATH
X11_Xv_LIB
X11_Xv_INCLUDE_PATH
X11_XShm_INCLUDE_PATH
X11_ICE_LIB
X11_ICE_INCLUDE_PATH
X11_SM_LIB
)
SET(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_SAVE})
ENDIF (UNIX)
# X11_FIND_REQUIRED_<component> could be checked too

View File

@ -0,0 +1,54 @@
################################################################################
#
# CMake script for finding XERCES.
# If the optional XERCES_ROOT_DIR environment variable exists, header files and
# libraries will be searched in the XERCES_ROOT_DIR/include and XERCES_ROOT_DIR/libs
# directories, respectively. Otherwise the default CMake search process will be
# used.
#
# This script creates the following variables:
# XERCES_FOUND: Boolean that indicates if the package was found
# XERCES_INCLUDE_DIRS: Paths to the necessary header files
# XERCES_LIBRARIES: Package libraries
#
# http://svn.mech.kuleuven.be/websvn/orocos/trunk/rtt/config/FindXerces.cmake
################################################################################
include(FindPackageHandleStandardArgs)
# Get hint from environment variable (if any)
if(NOT XERCES_ROOT_DIR AND DEFINED ENV{XERCES_ROOT_DIR})
set(XERCES_ROOT_DIR "$ENV{XERCES_ROOT_DIR}" CACHE PATH "XERCES base directory location (optional, used for nonstandard installation paths)")
mark_as_advanced(XERCES_ROOT_DIR)
endif()
# Search path for nonstandard locations
if(XERCES_ROOT_DIR)
set(XERCES_INCLUDE_PATH PATHS "${XERCES_ROOT_DIR}/include" NO_DEFAULT_PATH)
set(XERCES_LIBRARY_PATH PATHS "${XERCES_ROOT_DIR}/lib" NO_DEFAULT_PATH)
endif()
# Find headers and libraries
find_path(XERCES_INCLUDE_DIR NAMES xercesc/dom/DOM.hpp ${XERCES_INCLUDE_PATH})
find_library(XERCES_C_LIBRARY NAMES xerces-c xerces-c_3 ${XERCES_LIBRARY_PATH})
#find_library(XERCES_DEPDOM_LIBRARY NAMES xerces-depdom ${XERCES_LIBRARY_PATH})
# Set Xerces_FOUND honoring the QUIET and REQUIRED arguments
find_package_handle_standard_args(Xerces DEFAULT_MSG
XERCES_C_LIBRARY
#XERCES_DEPDOM_LIBRARY
XERCES_INCLUDE_DIR)
# Output variables
if(XERCES_FOUND)
# Include dirs
set(XERCES_INCLUDE_DIRS ${XERCES_INCLUDE_DIR})
# Libraries
set(XERCES_LIBRARIES ${XERCES_C_LIBRARY}
${XERCES_DEPDOM_LIBRARY})
endif()
# Advanced options for not cluttering the cmake UIs
mark_as_advanced(XERCES_INCLUDE_DIR XERCES_C_LIBRARY XERCES_DEPDOM_LIBRARY)

View File

@ -0,0 +1,246 @@
###############################################################################
# EXTERNAL LIBRARIES DETECTION #
###############################################################################
if (NOT DEFINED MTS_VERSION)
message(FATAL_ERROR "This file has to be included from the main build file.")
endif()
# Set up CMake to use the Mitsuba bundled libraries. Set the variable
# "MTS_NO_DEPENDENCIES" to a value which evaluates to TRUE to avoid
# using the Mitsuba dependencies even if they are present.
set(MTS_DEPS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/dependencies")
if((MSVC OR APPLE) AND NOT MTS_NO_DEPENDENCIES AND
IS_DIRECTORY "${MTS_DEPS_DIR}")
set(MTS_DEPENDENCIES ON)
set(CMAKE_PROGRAM_PATH "${MTS_DEPS_DIR}/bin")
set(CMAKE_INCLUDE_PATH "${MTS_DEPS_DIR}/include")
set(Boost_NO_SYSTEM_PATHS TRUE)
if (MSVC)
if(CMAKE_CL_64)
set(MTS_ARCH "x64")
else()
set(MTS_ARCH "i386")
endif()
list(APPEND CMAKE_INCLUDE_PATH "${MTS_DEPS_DIR}/qt/include")
set(CMAKE_LIBRARY_PATH "${MTS_DEPS_DIR}/lib/${MTS_ARCH}/"
"${MTS_DEPS_DIR}/qt/${MTS_ARCH}/lib/")
set(QT_BINARY_DIR "${MTS_DEPS_DIR}/qt/${MTS_ARCH}/bin")
elseif(APPLE)
set(CMAKE_LIBRARY_PATH "${MTS_DEPS_DIR}/lib")
set(CMAKE_FRAMEWORK_PATH "${MTS_DEPS_DIR}/frameworks")
set(QT_BINARY_DIR "${MTS_DEPS_DIR}/bin")
# Create a shell script to set the paths for dyld
file(WRITE "${PROJECT_BINARY_DIR}/binaries/mitsuba_dyld.sh"
"#!/bin/sh
# DYLD paths for the mitsuba dependencies. Created automatically by CMake.
export DYLD_FALLBACK_FRAMEWORK_PATH=\"${MTS_DEPS_DIR}/frameworks\":$DYLD_FALLBACK_FRAMEWORK_PATH
export DYLD_FALLBACK_LIBRARY_PATH=\"${MTS_DEPS_DIR}/lib\":$DYLD_FALLBACK_LIBRARY_PATH
")
endif()
else()
set(MTS_DEPENDENCIES OFF)
unset(MTS_DEPS_DIR)
endif()
# Qt4 (optional)
find_package(Qt4 4.7 COMPONENTS
QtCore QtGui QtXml QtXmlPatterns QtNetwork QtOpenGL)
CMAKE_DEPENDENT_OPTION(BUILD_GUI "Built the Qt4-based mitsuba GUI." ON
"QT4_FOUND" OFF)
# System threading library, used for custom options
set(CMAKE_THREAD_PREFER_PTHREAD ON)
find_package(Threads REQUIRED)
###########################################################################
# Boost
find_package(Boost 1.44 REQUIRED COMPONENTS "filesystem" "system" "thread")
# As of CMake 2.8.2, FindBoost doesn't honor the "REQUIRED" flag
if (NOT Boost_FOUND)
set(BOOST_ROOT "" CACHE PATH
"Preferred installation prefix for searching for Boost.")
message(FATAL_ERROR
"Boost is missing. The required modules are math, filesystem and system.")
endif()
mark_as_advanced(Boost_LIB_DIAGNOSTIC_DEFINITIONS)
# Check if spirit works: the version of Clang in Ubuntu 11.04 does not support
# the system version of Boost Spirit
set(CMAKE_REQUIRED_INCLUDES ${Boost_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${Boost_LIBRARIES})
CHECK_CXX_SOURCE_COMPILES("
#include <boost/spirit/include/qi.hpp>
int main (int argc, char **argv) {
return 0;
}
" BOOST_SPIRIT_WORKS)
# Try to figure out if this boost distro has Boost::python. If we include
# python in the main boost components list above, CMake will abort if it
# is not found. So we resort to checking for the boost_python library's
# existance to get a soft failure
if (APPLE AND MTS_DEPENDENCIES)
set(mts_boost_python_names boost_python boost_python26 boost_python27
boost_python32 boost_python33)
else()
set(mts_boost_python_names boost_python)
endif()
find_library (mts_boost_python_lib NAMES ${mts_boost_python_names}
HINTS ${Boost_LIBRARY_DIRS} NO_DEFAULT_PATH)
mark_as_advanced (mts_boost_python_lib)
if (NOT mts_boost_python_lib AND Boost_SYSTEM_LIBRARY_RELEASE)
get_filename_component (mts_boost_PYTHON_rel
${Boost_SYSTEM_LIBRARY_RELEASE} NAME
)
string (REGEX REPLACE "^(lib)?(.+)_system(.+)$" "\\2_python\\3"
mts_boost_PYTHON_rel ${mts_boost_PYTHON_rel}
)
find_library (mts_boost_PYTHON_LIBRARY_RELEASE
NAMES ${mts_boost_PYTHON_rel} lib${mts_boost_PYTHON_rel}
HINTS ${Boost_LIBRARY_DIRS}
NO_DEFAULT_PATH
)
mark_as_advanced (mts_boost_PYTHON_LIBRARY_RELEASE)
endif ()
if (NOT mts_boost_python_lib AND Boost_SYSTEM_LIBRARY_DEBUG)
get_filename_component (mts_boost_PYTHON_dbg
${Boost_SYSTEM_LIBRARY_DEBUG} NAME
)
string (REGEX REPLACE "^(lib)?(.+)_system(.+)$" "\\2_python\\3"
mts_boost_PYTHON_dbg ${mts_boost_PYTHON_dbg}
)
find_library (mts_boost_PYTHON_LIBRARY_DEBUG
NAMES ${mts_boost_PYTHON_dbg} lib${mts_boost_PYTHON_dbg}
HINTS ${Boost_LIBRARY_DIRS}
NO_DEFAULT_PATH
)
mark_as_advanced (mts_boost_PYTHON_LIBRARY_DEBUG)
endif ()
if (mts_boost_python_lib OR
mts_boost_PYTHON_LIBRARY_RELEASE OR mts_boost_PYTHON_LIBRARY_DEBUG)
set (mts_boost_PYTHON_FOUND ON)
else ()
set (mts_boost_PYTHON_FOUND OFF)
endif ()
###########################################################################
find_package(Eigen 3.0 REQUIRED)
find_package(JPEG 6 REQUIRED)
find_package(ZLIB 1.2 REQUIRED)
find_package(PNG 1.2 REQUIRED)
add_definitions(${PNG_DEFINITIONS})
find_package(IlmBase)
find_package(OpenEXR)
if (OPENEXR_FOUND AND WIN32)
set(CMAKE_REQUIRED_INCLUDES ${ILMBASE_INCLUDE_DIRS} ${OPENEXR_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${ILMBASE_LIBRARIES} ${OPENEXR_LIBRARIES})
CHECK_CXX_SOURCE_COMPILES("
#define OPENEXR_DLL
#include <OpenEXR/half.h>
#include <OpenEXR/ImfRgbaFile.h>
int main(int argc, char **argv) {
half x = 1.5f;
Imf::RgbaInputFile file(static_cast<const char*>(0));
file.readPixels(0,0);
return x > 0 ? 0 : 1;
}
" OPENEXR_IS_DLL)
unset (CMAKE_REQUIRED_INCLUDES)
unset (CMAKE_REQUIRED_LIBRARIES)
if (OPENEXR_IS_DLL)
add_definitions(-DOPENEXR_DLL)
endif()
endif()
# XERCES_ROOT_DIR
find_package(Xerces 3.0 REQUIRED)
# ColladaDOM (optional)
find_package(COLLADA)
if (COLLADA_FOUND)
add_definitions(-DMTS_HAS_COLLADA=1)
endif()
find_package(OpenGL REQUIRED)
set (GLEW_MX ON)
find_package(GLEW REQUIRED)
if (GLEW_FOUND)
set (GLEW_STATE_VARS ${GLEW_INCLUDE_DIRS} ${GLEW_LIBRARIES})
if (NOT GLEW_TEST_STATE)
set (GLEW_TEST_STATE "${GLEW_STATE_VARS}" CACHE INTERNAL "GLEW State")
endif ()
if (NOT GLEW_TEST_STATE STREQUAL "${GLEW_STATE_VARS}")
set (GLEW_TEST_STATE "${GLEW_STATE_VARS}" CACHE INTERNAL "GLEW State" FORCE)
unset (GLEW_VERSION_IS_OK CACHE)
endif ()
set (CMAKE_REQUIRED_INCLUDES ${GLEW_INCLUDE_DIRS})
set (CMAKE_REQUIRED_LIBRARIES ${GLEW_LIBRARIES})
CHECK_CXX_SOURCE_COMPILES("
#if defined(__APPLE__)
#include <OpenGL/glew.h>
#else
#include <GL/glew.h>
#endif
int main (int argc, char **argv) {
int i = GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV;
return 0;
}
" GLEW_VERSION_IS_OK)
if (NOT GLEW_VERSION_IS_OK)
# message (SEND_ERROR "The version of GLEW seems to be outdated!") XXX
endif ()
endif ()
# Try to get OpenMP support
find_package(OpenMP)
CMAKE_DEPENDENT_OPTION(MTS_OPENMP "Enable OpenMP support" ON
"OPENMP_FOUND" OFF)
if (MTS_OPENMP)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
else ()
add_definitions (-DMTS_NO_OPENMP)
endif()
# Linux requires X11
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
find_package(X11 REQUIRED)
if (NOT X11_xf86vmode_FOUND)
message(FATAL_ERROR "X11 vmode was not found.")
endif()
endif()
# Mac OS X Frameworks
if (APPLE)
find_library(COCOA_LIBRARY Cocoa)
find_library(BWTOOLKIT_LIBRARY BWToolkitFramework)
find_path(BWTOOLKIT_INCLUDE_DIR BWToolkitFramework/BWToolkitFramework.h)
find_library (SECURITY_LIBRARY Security
NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH)
find_path(SECURITY_INCLUDE_DIR "Authorization.h"
NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH)
mark_as_advanced (COCOA_LIBRARY)
mark_as_advanced (BWTOOLKIT_LIBRARY BWTOOLKIT_INCLUDE_DIR)
mark_as_advanced (SECURITY_LIBRARY SECURITY_INCLUDE_DIR)
endif()
# The Python libraries.
find_package (PythonLibs "2.6")
CMAKE_DEPENDENT_OPTION(BUILD_PYTHON "Build the Python bindings." ON
"PYTHONLIBS_FOUND;mts_boost_PYTHON_FOUND" OFF)
if (PYTHONLIBS_FOUND AND mts_boost_PYTHON_FOUND)
set (PYTHON_FOUND TRUE)
endif ()

View File

@ -0,0 +1,510 @@
# Macros to build the mitsuba targets. They are to be used by the CMake scripts
# only, otherwise they don't make any sense at all.
include (CMakeParseArguments)
include (CMakeDependentOption)
include (PCHTargets)
# Function to check that the assumed configurations exist
function (mts_check_configurations)
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(WARNING "The build type is not set. Set the value of CMAKE_BUILD_TYPE.")
return ()
endif ()
if (CMAKE_BUILD_TYPE)
set (configs ${ARGN})
list (FIND configs ${CMAKE_BUILD_TYPE} idx)
if (idx LESS 0)
message (AUTHOR_WARNING "Unexpected configuration '${CMAKE_BUILD_TYPE}' Check the value of CMAKE_BUILD_TYPE.")
endif ()
return ()
endif ()
set (configs "")
foreach (cfg ${CMAKE_CONFIGURATION_TYPES})
set (configs ${configs} ${cfg})
endforeach ()
set (myconfigs "")
foreach (cfg ${ARGN})
set (myconfigs ${myconfigs} ${cfg})
list (FIND configs ${cfg} idx)
if (idx LESS 0)
message (AUTHOR_WARNING "The assumed configuration '${cfg}' is not available.")
endif ()
endforeach ()
foreach (cfg ${configs})
list (FIND myconfigs ${cfg} idx)
if (idx LESS 0)
message (AUTHOR_WARNING "Unexpected configuration '${cfg}' found.")
endif ()
endforeach ()
endfunction()
# Check the standard configurations
mts_check_configurations (Debug Release MinSizeRel RelWithDebInfo)
# Option to enable interprocedural optimizations
option(MTS_LTCG "Enable interprocedural optimizations on Release targets" ON)
mark_as_advanced (MTS_LTCG)
# Macro to enable interprocedural optimizations on a target
macro (mts_target_ltcg target)
if (MTS_LTCG)
set_target_properties (${target} PROPERTIES
INTERPROCEDURAL_OPTIMIZATION_RELEASE 1
)
endif()
endmacro()
# Macro to enable parallel compilation on MSVC
macro (mts_msvc_mp target)
if (MSVC_IDE AND MSVC_VERSION GREATER 1400)
set_property (TARGET ${target} APPEND
PROPERTY COMPILE_FLAGS " /MP")
endif ()
endmacro()
# Option for precompiled headers
if (PCH_MSVC OR PCH_GCC)
set (MTS_PCH_DEFAULT ON)
else ()
set (MTS_PCH_DEFAULT OFF)
endif ()
CMAKE_DEPENDENT_OPTION (MTS_USE_PCH "Use precompiled headers (PCH)."
${MTS_PCH_DEFAULT} "PCH_SUPPORTED" OFF)
CMAKE_DEPENDENT_OPTION (MTS_USE_PCH_ALL_PLUGINS
"Use PCH for all plugins irrespective of their number of source files."
OFF "MTS_USE_PCH" OFF)
# Default project-wide header to be precompiled
set (MTS_DEFAULT_PCH "${PROJECT_SOURCE_DIR}/data/pch/mitsuba_precompiled.hpp")
# Function to configure the output path according to the configurations
# The output path configure expression, contained in "path_cfgstr" should
# have the placeholder @CFGNAME@ for proper substitution
function (SET_OUTPATH_CFG target_name property_suffix path_cfgstr)
if (CMAKE_CONFIGURATION_TYPES)
foreach (CFGNAME ${CMAKE_CONFIGURATION_TYPES})
string (TOUPPER ${CFGNAME} cfg_upper)
string (CONFIGURE "${path_cfgstr}" outpath @ONLY)
set_target_properties (${target_name} PROPERTIES
${property_suffix}_${cfg_upper} "${outpath}")
endforeach ()
else ()
set (CFGNAME ".")
string (CONFIGURE "${path_cfgstr}" outpath @ONLY)
set_target_properties (${target_name} PROPERTIES
${property_suffix} "${outpath}")
endif ()
endfunction ()
# Function to set up the default windows resource file:
# target_filename - where to write the configured file
# name - base name WITHOUT extension, eg "mitsuba"
# extension - file extension including the . ".exe"
# description - File description to be presented to users
# ICON <iconfile> - icon to be shown for executables
function(mts_win_resource target_filename name ext description)
CMAKE_PARSE_ARGUMENTS(_res "" "ICON" "" ${ARGN})
if (NOT WIN32)
message(AUTHOR_WARNING "This is not a Windows build!")
elseif(NOT MTS_VERSION)
message(AUTHOR_WARNING "The mitsuba version variable is not set")
endif()
set(RC_FILE "${PROJECT_SOURCE_DIR}/data/windows/mitsuba_res.rc.in")
#TODO Set up the VS_FF_PRERELEASE and VS_FF_PRIVATEBUILD flags adequately
string(TOLOWER "${ext}" ext_lower)
if(ext_lower STREQUAL ".dll")
set(RC_FILETYPE "VFT_DLL")
elseif(ext_lower STREQUAL ".exe")
set(RC_FILETYPE "VFT_APP")
elseif(ext_lower STREQUAL ".lib")
set(RC_FILETYPE "VFT_STATIC_LIB")
else()
message(AUTHOR_WARNING "Unknown windows file type: ${ext_lower}")
set(RC_FILETYPE "VFT_UNKNOWN")
endif()
if(_res_ICON)
get_filename_component(_res_dir "${target_filename}" PATH)
file(RELATIVE_PATH RC_ICON "${_res_dir}" "${_res_ICON}")
else()
set(RC_ICON "")
endif()
set(RC_DESCRIPTION "${description}")
#TODO Add the hg revision number to the version, e.g. 0.0.0-hg000000000000
set(RC_VERSION "${MTS_VERSION}")
set(RC_VERSION_COMMA "${MTS_VERSION}.0")
string(REPLACE "." "," RC_VERSION_COMMA ${RC_VERSION_COMMA})
set(RC_FILENAME "${name}${ext}")
set(RC_NAME "${name}")
#TODO Set the year programmatically
set(RC_YEAR "2012")
configure_file("${RC_FILE}" "${target_filename}" ESCAPE_QUOTES @ONLY)
endfunction()
# Constant with the bundle name for Mitsuba
set(MTS_BUNDLE_NAME "Mitsuba.app")
set(MTS_BUNDLE_RESOURCES "${MTS_BUNDLE_NAME}/Contents/Resources")
# Flag to use either simple or traditional Unix paths (e.g. share/mitsuba/...)
CMAKE_DEPENDENT_OPTION(MTS_SIMPLE_PATHS
"Use a simple, Windows-like dir structure instead of the typical Unix one."
ON "NOT WIN32; NOT APPLE" OFF)
# Constant with the destination for the Python bindings
if (WIN32 OR MTS_SIMPLE_PATHS)
set(MTS_PYTHON_DEST "python")
elseif (APPLE)
set(MTS_PYTHON_DEST "${MTS_BUNDLE_NAME}/python")
else()
set(MTS_PYTHON_DEST "share/mitsuba/python")
endif()
# Constant with the destination for the core libraries
if (WIN32 OR MTS_SIMPLE_PATHS)
set(MTS_LIB_DEST ".")
elseif (APPLE)
set(MTS_LIB_DEST "${MTS_BUNDLE_NAME}/Contents/Frameworks")
else ()
set(MTS_LIB_DEST "lib")
endif ()
# Macro to add a build target for a mitsuba core library.
#
# Usage:
#
# add_mts_corelib (name source1 [source2 ...]
# [LINK_LIBRARIES external_lib1 ...] )
#
# The plugin name is taken from the first argument. Additional libraries
# (for example, libpng) may be specified after the optionl LINK_LIBRARIES
# keyword.
#
# Each time this macro adds a target, it adds a new element to the
# variable "MTS_CORELIBS", which will contain all the generated core libs
#
macro (add_mts_corelib _corelib_name)
CMAKE_PARSE_ARGUMENTS(_corelib "" "" "LINK_LIBRARIES" ${ARGN})
set (_corelib_srcs ${_corelib_UNPARSED_ARGUMENTS})
set(MTS_CORELIBS ${MTS_CORELIBS} ${_corelib_name} PARENT_SCOPE)
if (WIN32)
set(_corelib_res "${CMAKE_CURRENT_BINARY_DIR}/${_corelib_name}_res.rc")
set(_corelib_description "Mitsuba core library: ${_corelib_name}")
mts_win_resource("${_corelib_res}"
"lib${_corelib_name}" ".dll" "${_corelib_description}")
list(APPEND _corelib_srcs "${_corelib_res}")
endif()
if (MTS_USE_PCH)
pch_add_library (${_corelib_name} SHARED
PCH_HEADER "${MTS_DEFAULT_PCH}" ${_corelib_srcs})
else ()
add_library (${_corelib_name} SHARED ${_corelib_srcs})
endif ()
target_link_libraries (${_corelib_name} ${_corelib_LINK_LIBRARIES})
if (WIN32)
set_target_properties (${_corelib_name} PROPERTIES
PREFIX "lib"
VERSION "${MTS_VERSION}")
endif()
if (WIN32)
set (_corelib_property_suffix "RUNTIME_OUTPUT_DIRECTORY")
else ()
set (_corelib_property_suffix "LIBRARY_OUTPUT_DIRECTORY")
endif ()
SET_OUTPATH_CFG (${_corelib_name} ${_corelib_property_suffix}
"${PROJECT_BINARY_DIR}/binaries/@CFGNAME@/${MTS_LIB_DEST}"
)
mts_target_ltcg (${_corelib_name})
mts_msvc_mp (${_corelib_name})
install(TARGETS ${_corelib_name}
RUNTIME DESTINATION "${MTS_LIB_DEST}" COMPONENT Runtime
LIBRARY DESTINATION "${MTS_LIB_DEST}" COMPONENT Runtime
ARCHIVE DESTINATION "sdk/lib" COMPONENT Developer
)
endmacro()
# Constant with the destination for the plugins
if (WIN32 OR MTS_SIMPLE_PATHS)
set(MTS_PLUGIN_DEST "plugins")
elseif (APPLE)
set(MTS_PLUGIN_DEST "${MTS_BUNDLE_NAME}/plugins")
else()
set(MTS_PLUGIN_DEST "share/mitsuba/plugins")
endif()
# Macro to add a build target for a mitsuba plugin (based on the OIIO one).
#
# Usage:
#
# add_mts_plugin (name source1 [source2 ...]
# [LINK_LIBRARIES external_lib1 ...]
# [MTS_HW] [MTS_BIDIR]
# [NO_MTS_PCH]
# [TYPE plugin_type] )
#
# The plugin name is taken from the first argument and the
# source is automatically linked against mitsuba libraries. Additional
# libraries (for example, libpng) may be specified after the optional
# LINK_LIBRARIES keyword. NO_MTS_PCH makes the target not to use the
# default mitsuba precompiled header (on supported platforms).
#
# By default the plugins are linked against mitsuba-core and mitsuba-render.
# When MTS_HW is set, the plugin will be linked against with mitsuba-hw. When
# MTS_BIDIR is specified, the plugin will also be linked against mitsuba-bidir.
#
# The plugin type (i.e. camera, bsdf, luminaire) may be specified
# after the TYPE keyword. Currently doing this modifies the IDE project name
# in order to have a nicer organization.
#
macro (add_mts_plugin _plugin_name)
CMAKE_PARSE_ARGUMENTS(_plugin "MTS_HW;MTS_BIDIR;NO_MTS_PCH"
"TYPE" "LINK_LIBRARIES" ${ARGN})
set (_plugin_srcs ${_plugin_UNPARSED_ARGUMENTS})
if (WIN32)
set(_plugin_res "${CMAKE_CURRENT_BINARY_DIR}/${_plugin_name}_res.rc")
if (_plugin_TYPE)
set(_plugin_description "Mitsuba ${_plugin_TYPE} plugin: ${_plugin_name}")
else()
set(_plugin_description "Mitsuba plugin: ${_plugin_name}")
endif()
mts_win_resource("${_plugin_res}"
"${_plugin_name}" ".dll" "${_plugin_description}")
list(APPEND _plugin_srcs "${_plugin_res}")
endif()
# Use the PCH only with the plugins with 2 or more source files
set(_plugin_cxx_count "0")
foreach(_src ${_plugin_srcs})
if(_src MATCHES ".+\\.[cC][^.]*$")
math(EXPR _plugin_cxx_count "${_plugin_cxx_count} + 1")
endif()
endforeach()
if (NOT _plugin_NO_MTS_PCH AND MTS_USE_PCH AND
(MTS_USE_PCH_ALL_PLUGINS OR _plugin_cxx_count GREATER 1))
pch_add_library (${_plugin_name} MODULE
PCH_HEADER "${MTS_DEFAULT_PCH}" ${_plugin_srcs})
else ()
add_library (${_plugin_name} MODULE ${_plugin_srcs})
endif ()
set(core_libraries "mitsuba-core" "mitsuba-render")
if (_plugin_MTS_HW)
list(APPEND core_libraries "mitsuba-hw")
endif()
if (_plugin_MTS_BIDIR)
list(APPEND core_libraries "mitsuba-bidir")
endif()
target_link_libraries (${_plugin_name}
${core_libraries} ${_plugin_LINK_LIBRARIES})
set_target_properties (${_plugin_name} PROPERTIES PREFIX "")
if (APPLE)
set_target_properties (${_plugin_name} PROPERTIES SUFFIX ".dylib")
endif ()
if (WIN32)
set_target_properties (${_plugin_name} PROPERTIES VERSION "${MTS_VERSION}")
endif()
set (_plugin_FOLDER "plugins")
if (_plugin_TYPE)
if (CMAKE_GENERATOR MATCHES "Visual Studio")
set (_plugin_FOLDER "plugins/${_plugin_TYPE}")
else()
set_target_properties (${_plugin_name} PROPERTIES
PROJECT_LABEL "${_plugin_TYPE}-${_plugin_name}")
endif()
endif()
set_target_properties (${_plugin_name} PROPERTIES
FOLDER ${_plugin_FOLDER})
unset (_plugin_FOLDER)
SET_OUTPATH_CFG (${_plugin_name} LIBRARY_OUTPUT_DIRECTORY
"${PROJECT_BINARY_DIR}/binaries/@CFGNAME@/${MTS_PLUGIN_DEST}"
)
mts_target_ltcg (${_plugin_name})
mts_msvc_mp (${_plugin_name})
install(TARGETS ${_plugin_name}
RUNTIME DESTINATION ${MTS_PLUGIN_DEST} COMPONENT Runtime
LIBRARY DESTINATION ${MTS_PLUGIN_DEST} COMPONENT Runtime)
endmacro ()
# Constant with the executables destination
if (WIN32 OR MTS_SIMPLE_PATHS)
set (MTS_EXE_DEST ".")
elseif (APPLE)
set (MTS_EXE_DEST "${MTS_BUNDLE_NAME}/Contents/MacOS")
else()
set (MTS_EXE_DEST "bin")
endif()
# Macro to add a build target for a mitsuba application.
#
# Usage:
#
# add_mts_exe (name [WIN32] source1 [source2 ...]
# [LINK_LIBRARIES external_lib1 ...]
# [RES_ICON filename]
# [RES_DESCRIPTION "Description string"]
# [NO_INSTALL]
# [NO_MTS_PCH | PCH pch_header] )
#
# The executable name is taken from the first argument. The target gets
# automatically linked against mitusba's core libraries, as defined
# in the "MTS_CORELIBS" variable Additional libraries
# (for example, libpng) may be specified after the optionl LINK_LIBRARIES
# keyword.
#
# The optional keyword WIN32, if presents, gets passed to add_executable(...)
# to produce a Windows executable using winmain, thus it won't have a
# console. The NO_INSTALL keyword causes the target not to be installed.
# NO_MTS_PCH makes the target not to use the default mitsuba precompiled header
# (on supported platforms). PCH specifies a custom precompiler header to use
# which is more suitable for the application.
#
# The optional RES_ICON parameter specified an icon to be bundled into the
# executable. This only works on Windows builds. The optional RES_DESCRIPTION
# parameters sets a specific executable description to be used in the Windows
# builds; other platforms simply ignore this value as with RES_ICON.
#
macro (add_mts_exe _exe_name)
CMAKE_PARSE_ARGUMENTS(_exe "WIN32;NO_INSTALL;NO_MTS_PCH"
"PCH;RES_ICON;RES_DESCRIPTION" "LINK_LIBRARIES" ${ARGN})
set (_exe_srcs ${_exe_UNPARSED_ARGUMENTS})
if (_exe_WIN32)
set(_exe_TYPE WIN32)
endif()
if (WIN32)
set(_exe_res "${CMAKE_CURRENT_BINARY_DIR}/${_exe_name}_res.rc")
set(_exe_res_args "${_exe_res}" "${_exe_name}" ".exe")
if (_exe_RES_DESCRIPTION)
set(_exe_description "${_exe_RES_DESCRIPTION}")
else()
set(_exe_description "Mitsuba application: ${_exe_name}")
endif()
list(APPEND _exe_res_args "${_exe_description}")
if (_exe_RES_ICON)
list(APPEND _exe_res_args "ICON" "${_exe_RES_ICON}")
endif()
mts_win_resource(${_exe_res_args})
list(APPEND _exe_srcs "${_exe_res}")
endif()
if (MTS_USE_PCH AND (NOT _exe_NO_MTS_PCH OR _exe_PCH))
set (_exe_pch_header "${MTS_DEFAULT_PCH}")
if (_exe_PCH)
set (_exe_pch_header "${_exe_PCH}")
if (_exe_NO_MTS_PCH)
message (AUTHOR_WARNING
"'NO_MTS_PCH' ignored due to 'PCH ${_exe_PCH}'.")
endif ()
endif ()
pch_add_executable (${_exe_name} ${_exe_TYPE}
PCH_HEADER "${_exe_pch_header}" ${_exe_srcs})
else ()
add_executable (${_exe_name} ${_exe_TYPE} ${_exe_srcs})
endif ()
target_link_libraries (${_exe_name}
${MTS_CORELIBS} ${_exe_LINK_LIBRARIES})
if (WIN32)
set_target_properties (${_exe_name} PROPERTIES VERSION "${MTS_VERSION}")
endif()
set_target_properties (${_exe_name} PROPERTIES FOLDER "apps")
SET_OUTPATH_CFG (${_exe_name} RUNTIME_OUTPUT_DIRECTORY
"${PROJECT_BINARY_DIR}/binaries/@CFGNAME@/${MTS_EXE_DEST}"
)
mts_target_ltcg (${_exe_name})
mts_msvc_mp (${_exe_name})
if (NOT _exe_NO_INSTALL)
install(TARGETS ${_exe_name}
RUNTIME DESTINATION ${MTS_EXE_DEST} COMPONENT Runtime)
endif()
endmacro()
# Constant with the headers destination
if (WIN32 OR MTS_SIMPLE_PATHS)
set (MTS_HEADER_DEST "sdk/include")
elseif (APPLE)
set (MTS_HEADER_DEST "${MTS_BUNDLE_NAME}/Headers")
else()
set (MTS_HEADER_DEST "include")
endif()
# Macro to install header files. The FOLDER option specifies a subdirectory
# on which the given headers will be installed. Usage:
# mts_install_headers(header1 header2 ... [FOLDER subdir])
macro (mts_install_headers)
CMAKE_PARSE_ARGUMENTS(_hdrs "" "FOLDER" "" ${ARGN})
set (_hdrs_files ${_hdrs_UNPARSED_ARGUMENTS})
if (NOT _hdrs_FOLDER)
set (_hdrs_FOLDER ".")
endif ()
install (FILES ${_hdrs_files}
PERMISSIONS "OWNER_READ" "GROUP_READ" "WORLD_READ"
DESTINATION "${MTS_HEADER_DEST}/${_hdrs_FOLDER}"
COMPONENT Developer)
endmacro ()
# Function to get a list of paths contained in variables which match the regex
# "LIBRAR(Y|IES)$". This is intended to be used with the FIXUP_BUNDLE macro.
# Example usage:
# mts_library_paths (paths)
# message (${paths})
function (mts_library_paths outvar_name)
set (library_paths "")
get_cmake_property (variables VARIABLES)
foreach (var ${variables})
if (var MATCHES "LIBRAR(Y|IES)$")
foreach (path ${${var}})
get_filename_component (libpath "${path}" PATH)
if (libpath AND EXISTS "${libpath}")
get_filename_component (libpath "${libpath}" REALPATH)
set (library_paths ${library_paths} ${libpath})
endif ()
endforeach ()
endif ()
endforeach ()
list (REMOVE_DUPLICATES library_paths)
# Try to add the "bin" directories that might exist as well
set (bin_paths "")
if (WIN32)
foreach (libpath ${library_paths})
if (EXISTS "${libpath}/../bin")
get_filename_component (binpath "${libpath}/../bin" REALPATH)
set (bin_paths ${bin_paths} ${binpath})
endif ()
if (EXISTS "${libpath}/bin")
get_filename_component (binpath "${libpath}/bin" REALPATH)
set (bin_paths ${bin_paths} ${binpath})
endif ()
endforeach ()
endif ()
list (REMOVE_DUPLICATES bin_paths)
set (${outvar_name} ${bin_paths} ${library_paths} PARENT_SCOPE)
endfunction ()

View File

@ -0,0 +1,320 @@
# - Functions to help assemble a standalone bundle application (with @rpath).
# A collection of CMake utility functions useful for dealing with .app
# bundles on the Mac and bundle-like directories on any OS.
# This module is based on the "BundleUtilities" module included with
# CMake 2.8.5, the difference is that for the Mac this module assumes
# that all dependencies (both dynamic libraries and frameworks) are installed
# under <bundle>/Contents/Frameworks. Thus the fixup stage will use @rpath
# instead of @executable_path.
#
# The following functions are provided by this module:
# mts_fixup_bundle
# mts_clear_bundle_keys (privately used by mts_fixup_bundle)
# mts_fixup_bundle_item (privately used by mts_fixup_bundle)
# Requires CMake 2.6 or greater because it uses function, break and
# PARENT_SCOPE. Also depends on GetPrerequisites.cmake and the standard
# BundleUtilities.cmake.
#
# MTS_FIXUP_BUNDLE(<app> <libs> <dirs>)
# Fix up a bundle in-place and make it standalone, such that it can be
# drag-n-drop copied to another machine and run on that machine as long as all
# of the system libraries are compatible.
#
# If you pass plugins to fixup_bundle as the libs parameter, you should install
# them or copy them into the bundle before calling fixup_bundle. The "libs"
# parameter is a list of libraries that must be fixed up, but that cannot be
# determined by otool output analysis. (i.e., plugins)
#
# Gather all the keys for all the executables and libraries in a bundle, and
# then, for each key, copy each prerequisite into the bundle. Then fix each one
# up according to its own list of prerequisites.
#
# Then clear all the keys and call verify_app on the final bundle to ensure
# that it is truly standalone.
#
# MTS_FIXUP_BUNDLE_ITEM(<resolved_embedded_item> <exepath> <dirs>)
# Get the direct/non-system prerequisites of the resolved embedded item. For
# each prerequisite, change the way it is referenced to the value of the
# _EMBEDDED_ITEM keyed variable for that prerequisite. (Most likely changing to
# an "@executable_path" style reference.)
#
# This function requires that the resolved_embedded_item be "inside" the bundle
# already. In other words, if you pass plugins to fixup_bundle as the libs
# parameter, you should install them or copy them into the bundle before
# calling fixup_bundle. The "libs" parameter is a list of libraries that must
# be fixed up, but that cannot be determined by otool output analysis. (i.e.,
# plugins)
#
# Also, change the id of the item being fixed up to its own _EMBEDDED_ITEM
# value.
#
# Accumulate changes in a local variable and make *one* call to
# install_name_tool at the end of the function with all the changes at once.
#
# If the BU_CHMOD_BUNDLE_ITEMS variable is set then bundle items will be
# marked writable before install_name_tool tries to change them.
#=============================================================================
# Copyright 2008-2009 Kitware, Inc.
#
# CMake - Cross Platform Makefile Generator
# Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the names of Kitware, Inc., the Insight Software Consortium,
# nor the names of their contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# ----------------------------------------------------------------------------
#
# The above copyright and license notice applies to distributions of
# CMake in source and binary form. Some source files contain additional
# notices of original copyright by their contributors; see each source
# for details. Third-party software packages supplied with CMake under
# compatible licenses provide their own copyright notices documented in
# corresponding subdirectories.
#
# ----------------------------------------------------------------------------
#
# CMake was initially developed by Kitware with the following sponsorship:
#
# * National Library of Medicine at the National Institutes of Health
# as part of the Insight Segmentation and Registration Toolkit (ITK).
#
# * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
# Visualization Initiative.
#
# * National Alliance for Medical Image Computing (NAMIC) is funded by the
# National Institutes of Health through the NIH Roadmap for Medical
# Research, Grant U54 EB005149.
#
#=============================================================================
# The module still depends on the standard BundleUtilities and GetPrerequites modules
include(BundleUtilities)
include(GetPrerequisites)
function(mts_clear_bundle_keys keys_var)
foreach(key ${${keys_var}})
set(${key}_ITEM PARENT_SCOPE)
set(${key}_RESOLVED_ITEM PARENT_SCOPE)
set(${key}_DEFAULT_EMBEDDED_PATH PARENT_SCOPE)
set(${key}_EMBEDDED_ITEM PARENT_SCOPE)
set(${key}_RESOLVED_EMBEDDED_ITEM PARENT_SCOPE)
set(${key}_COPYFLAG PARENT_SCOPE)
set(${key}_EMBEDDED_RPATH PARENT_SCOPE)
set(${key}_RPATH_DIR PARENT_SCOPE)
endforeach(key)
set(${keys_var} PARENT_SCOPE)
endfunction(mts_clear_bundle_keys)
function(mts_fixup_bundle_item resolved_embedded_item exepath dirs)
# This item's key is "ikey":
#
get_item_key("${resolved_embedded_item}" ikey)
# Ensure the item is "inside the .app bundle" -- it should not be fixed up if
# it is not in the .app bundle... Otherwise, we'll modify files in the build
# tree, or in other varied locations around the file system, with our call to
# install_name_tool. Make sure that doesn't happen here:
#
get_dotapp_dir("${exepath}" exe_dotapp_dir)
string(LENGTH "${exe_dotapp_dir}/" exe_dotapp_dir_length)
string(LENGTH "${resolved_embedded_item}" resolved_embedded_item_length)
set(path_too_short 0)
set(is_embedded 0)
if(${resolved_embedded_item_length} LESS ${exe_dotapp_dir_length})
set(path_too_short 1)
endif()
if(NOT path_too_short)
string(SUBSTRING "${resolved_embedded_item}" 0 ${exe_dotapp_dir_length} item_substring)
if("${exe_dotapp_dir}/" STREQUAL "${item_substring}")
set(is_embedded 1)
endif()
endif()
if(NOT is_embedded)
message(" exe_dotapp_dir/='${exe_dotapp_dir}/'")
message(" item_substring='${item_substring}'")
message(" resolved_embedded_item='${resolved_embedded_item}'")
message("")
message("Install or copy the item into the bundle before calling mts_fixup_bundle.")
message("Or maybe there's a typo or incorrect path in one of the args to mts_fixup_bundle?")
message("")
message(FATAL_ERROR "cannot fixup an item that is not in the bundle...")
endif()
set(prereqs "")
get_prerequisites("${resolved_embedded_item}" prereqs 1 0 "${exepath}" "${dirs}")
set(changes "")
set(rpath_dirlst "")
foreach(pr ${prereqs})
# Each referenced item's key is "rkey" in the loop:
#
get_item_key("${pr}" rkey)
if(NOT "${${rkey}_EMBEDDED_ITEM}" STREQUAL "")
set(changes ${changes} "-change" "${pr}" "${${rkey}_EMBEDDED_ITEM}")
else(NOT "${${rkey}_EMBEDDED_ITEM}" STREQUAL "")
message("warning: unexpected reference to '${pr}'")
endif(NOT "${${rkey}_EMBEDDED_ITEM}" STREQUAL "")
if(NOT "${${rkey}_EMBEDDED_RPATH}" STREQUAL "" AND
NOT "${${rkey}_RPATH_DIR}" STREQUAL "")
# Assumes the rpath dir is already an absolute path
list(APPEND rpath_dirlst "${${rkey}_RPATH_DIR}")
endif()
endforeach(pr)
if(BU_CHMOD_BUNDLE_ITEMS)
execute_process(COMMAND chmod u+w "${resolved_embedded_item}")
endif()
# Assumes that the only required location
if(rpath_dirlst)
list(REMOVE_DUPLICATES rpath_dirlst)
list(LENGTH rpath_dirlst rpath_len)
if (rpath_len GREATER 1)
message(WARNING "Only one location for rpath is supported, ${rpath_len} provided.")
endif ()
list(GET rpath_dirlst 0 rpath_dir)
# Determine how to get from the current component directory to rpath_dir
get_filename_component(resolved_embedded_path "${resolved_embedded_item}" PATH)
file(RELATIVE_PATH rpath_relative "${resolved_embedded_path}" "${rpath_dir}")
if("${rpath_relative}" STREQUAL "")
set(embedded_rpath "@loader_path/.")
else()
set(embedded_rpath "@loader_path/${rpath_relative}")
endif()
list(APPEND changes "-add_rpath" "${embedded_rpath}")
endif()
# Change this item's id and all of its references in one call
# to install_name_tool:
#
execute_process(COMMAND install_name_tool
${changes} -id "${${ikey}_EMBEDDED_ITEM}" "${resolved_embedded_item}"
)
endfunction(mts_fixup_bundle_item)
function(mts_fixup_bundle app libs dirs)
message(STATUS "mts_fixup_bundle")
message(STATUS " app='${app}'")
message(STATUS " libs='${libs}'")
message(STATUS " dirs='${dirs}'")
get_bundle_and_executable("${app}" bundle executable valid)
if(valid)
get_filename_component(exepath "${executable}" PATH)
message(STATUS "mts_fixup_bundle: preparing...")
get_bundle_keys("${app}" "${libs}" "${dirs}" keys)
message(STATUS "mts_fixup_bundle: copying...")
list(LENGTH keys n)
math(EXPR n ${n}*2)
set(i 0)
foreach(key ${keys})
math(EXPR i ${i}+1)
if(${${key}_COPYFLAG})
message(STATUS "${i}/${n}: copying '${${key}_RESOLVED_ITEM}'")
else(${${key}_COPYFLAG})
message(STATUS "${i}/${n}: *NOT* copying '${${key}_RESOLVED_ITEM}'")
endif(${${key}_COPYFLAG})
# Modify the embedded flag to use rpath. Assumes all frameworks and
# libraries were copied to <bundle>/Contents/Frameworks
if (APPLE AND NOT "${${key}_EMBEDDED_ITEM}" STREQUAL "" AND
"${${key}_ITEM}" MATCHES "[^/]+(\\.framework/|\\.dylib$)")
file(RELATIVE_PATH irelpath "${bundle}/Contents/Frameworks" "${${key}_RESOLVED_EMBEDDED_ITEM}")
# Check if the item is in fact in the "Frameworks" directory
string(SUBSTRING "${irelpath}" 0 3 irelpath_start)
if (NOT "${irelpath_start}" STREQUAL "../")
# Replace the embedded key for one using rpath
set (${key}_EMBEDDED_ITEM "@rpath/${irelpath}")
# Flag this key as using RPATH
set (${key}_EMBEDDED_RPATH 1)
set (${key}_RPATH_DIR "${bundle}/Contents/Frameworks")
endif ()
endif ()
set(show_status 0)
if(show_status)
message(STATUS "key='${key}'")
message(STATUS "item='${${key}_ITEM}'")
message(STATUS "resolved_item='${${key}_RESOLVED_ITEM}'")
message(STATUS "default_embedded_path='${${key}_DEFAULT_EMBEDDED_PATH}'")
message(STATUS "embedded_item='${${key}_EMBEDDED_ITEM}'")
message(STATUS "resolved_embedded_item='${${key}_RESOLVED_EMBEDDED_ITEM}'")
message(STATUS "copyflag='${${key}_COPYFLAG}'")
message(STATUS "embedded_rpath='${${key}_EMBEDDED_RPATH}'")
message(STATUS "rpath_dir='${${key}_RPATH_DIR}'")
message(STATUS "")
endif(show_status)
if(${${key}_COPYFLAG})
set(item "${${key}_ITEM}")
if(item MATCHES "[^/]+\\.framework/")
copy_resolved_framework_into_bundle("${${key}_RESOLVED_ITEM}"
"${${key}_RESOLVED_EMBEDDED_ITEM}")
else()
copy_resolved_item_into_bundle("${${key}_RESOLVED_ITEM}"
"${${key}_RESOLVED_EMBEDDED_ITEM}")
endif()
endif(${${key}_COPYFLAG})
endforeach(key)
message(STATUS "mts_fixup_bundle: fixing...")
foreach(key ${keys})
math(EXPR i ${i}+1)
if(APPLE)
message(STATUS "${i}/${n}: fixing up '${${key}_RESOLVED_EMBEDDED_ITEM}'")
mts_fixup_bundle_item("${${key}_RESOLVED_EMBEDDED_ITEM}" "${exepath}" "${dirs}")
else(APPLE)
message(STATUS "${i}/${n}: fix-up not required on this platform '${${key}_RESOLVED_EMBEDDED_ITEM}'")
endif(APPLE)
endforeach(key)
message(STATUS "mts_fixup_bundle: cleaning up...")
mts_clear_bundle_keys(keys)
message(STATUS "mts_fixup_bundle: verifying...")
verify_app("${app}")
else(valid)
message(SEND_ERROR "error: mts_fixup_bundle: not a valid bundle")
endif(valid)
message(STATUS "mts_fixup_bundle: done")
endfunction(mts_fixup_bundle)

475
data/cmake/PCHTargets.cmake Normal file
View File

@ -0,0 +1,475 @@
# - Create libraries and executables using a common precompiled header (PCH.)
#
# This module provides PCH versions of add_library and add_executable,
# for GCC and MSVC and Clang. It depends on the module "CMakeParseArguments",
# introduced in CMake 2.8.3
#
# The module defines the global variable:
# PCH_SUPPORTED - If true, it is safe to use the other macros in the module.
#
# The main user functions provided behave as the standard add_executable() and
# add_library() functions, except that they specify a common PCH file.
#
# pch_add_executable(name [WIN32] [MACOSX_BUNDLE]
# [EXCLUDE_FROM_ALL]
# PCH_HEADER <header>
# source1 source2 ... sourceN)
#
# pch_add_library(name [SHARED | MODULE | STATIC]
# [EXCLUDE_FROM_ALL]
# PCH_HEADER <header>
# source1 source2 ... sourceN)
#
#=============================================================================
# Edgar Velázquez-Armendáriz, Cornell University (cs.cornell.edu - eva5)
# Distributed under the OSI-approved MIT License (the "License")
#
# Copyright (c) 2011 Program of Computer Graphics, Cornell University
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#=============================================================================
include (CMakeParseArguments)
set (PCH_MSVC FALSE)
set (PCH_GCC FALSE)
set (PCH_CLANG FALSE)
if (MSVC OR (WIN32 AND CMAKE_CXX_COMPILER_ID MATCHES "Intel"))
set (PCH_MSVC TRUE)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set (PCH_CLANG TRUE)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set (PCH_GCC TRUE)
elseif (NOT WIN32 AND CMAKE_CXX_COMPILER_ID MATCHES "Intel")
set (PCH_INTEL TRUE)
endif ()
# Sets PCH_SUPPORTED to TRUE if the platform supports precompiled headers,
# otherwise it is set to FALSE. Do not try to use the
# pch_add_<library|executable> macros unless this is TRUE.
if (PCH_MSVC OR PCH_GCC OR PCH_CLANG OR PCH_INTEL)
set (PCH_SUPPORTED TRUE)
else ()
set (PCH_SUPPORTED FALSE)
endif ()
# Helper function to write a file only if its content changes. Used to
# avoid unnecessary rebuilds
function (pvt_write_if_changed filename text)
set (needs_write TRUE)
if (EXISTS "${filename}")
file (READ "${filename}" text_current)
if ("${text_current}" STREQUAL "${text}")
set (needs_write FALSE)
endif ()
endif ()
if (needs_write)
file (WRITE "${filename}" "${text}")
endif ()
endfunction ()
# Funtion to return the current count of PCH headers
function (pvt_get_pch_count out_var_name)
get_property(pchcount GLOBAL PROPERTY "pch_count")
if (NOT pchcount)
set (pchcount 0)
endif ()
set (${out_var_name} ${pchcount} PARENT_SCOPE)
endfunction ()
# Function to increment by one the count of PCH headers
function (pvc_increment_pch_count)
pvt_get_pch_count (pchcount)
math (EXPR pchcount "${pchcount} + 1")
set_property (GLOBAL PROPERTY "pch_count" ${pchcount})
endfunction ()
# Private function to generate the rules for compiling the PCH.
# Assumes pch_header does not contain directories, eg foo.h
# The variable contained in out_stub_src_var will hold the name of the
# generated source stub file.
function (PVT_ADD_PCH_RULE_MSVC pch_header_filename out_stub_src_var pch_subdir_external)
get_filename_component (pch_header "${pch_header_filename}" NAME)
get_filename_component (pch_header_path "${pch_header_filename}" PATH)
get_filename_component (pch_header_name "${pch_header_filename}" NAME_WE)
if(NOT pch_subdir_external)
pvt_get_pch_count (pch_count)
set(pch_subdir "pch.${pch_count}")
else()
set(pch_subdir "${pch_subdir_external}")
endif()
set (stub_src "${CMAKE_CURRENT_BINARY_DIR}/${pch_subdir}/${pch_header_name}_stub.cpp")
set (stub_src_text
"// Stub file for the PCH ${pch_header}. Generated by CMake.\n#include <${pch_header}>\n"
)
pvt_write_if_changed ("${stub_src}" "${stub_src_text}")
set_property (SOURCE "${stub_src}" PROPERTY
COMPILE_FLAGS "/Yc\"${pch_header}\" /I\"${pch_header_path}\"")
set (${out_stub_src_var} "${stub_src}" PARENT_SCOPE)
endfunction ()
# Helper function to extract the configuration-dependent compile flags.
# "cfgname" name is usually Release, Debug, RelWithDebugInfo or RelMinSize
function (pvt_config_flags cfgname out_list_var_name)
string (TOUPPER ${cfgname} cfg_upper)
set (args_cxx "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${cfg_upper}}")
separate_arguments (args_cxx)
get_directory_property (dir_compile_defs COMPILE_DEFINITIONS_${cfg_upper})
foreach (dir_def ${dir_compile_defs})
list (APPEND args_cxx "-D${dir_def}")
endforeach ()
set (${out_list_var_name} ${args_cxx} PARENT_SCOPE)
endfunction ()
# Based on CMake's proposed module PCH_GCC4_v2.cmake (2010-07-26)
# http://www.cmake.org/Bug/view.php?id=1260
function (PVT_ADD_PCH_RULE pch_header_filename out_generated_files
out_pch_filename extra_compile_flags pch_subdir_external)
if (PCH_GCC)
set (pch_ext "gch")
elseif (PCH_CLANG)
set (pch_ext "pch")
elseif (PCH_INTEL)
set (pch_ext "pchi")
else ()
message (AUTHOR_WARNING "Function being used for neither gcc, clang not intel")
endif ()
get_filename_component (pch_header "${pch_header_filename}" NAME)
get_filename_component (pch_header_path "${pch_header_filename}" PATH)
get_filename_component (pch_header_name "${pch_header_filename}" NAME_WE)
if(NOT pch_subdir_external)
pvt_get_pch_count (pch_count)
set(pch_subdir "pch.${pch_count}")
else()
set(pch_subdir "${pch_subdir_external}")
endif()
set (pch_dir_cfgname "${CMAKE_CURRENT_BINARY_DIR}/${pch_subdir}/@CFGNAME@")
set (pch_filename_cfgname "${pch_dir_cfgname}/${pch_header}.${pch_ext}")
# Generate the stub file for the Intel Compiler
if (PCH_INTEL)
set (pch_stub_src "${CMAKE_CURRENT_BINARY_DIR}/${pch_subdir}/${pch_header_name}_stub.cpp")
set (pch_stub_src_text
"// Stub file for the PCH ${pch_header}. Generated by CMake.\n#include <${pch_header}>\n"
)
pvt_write_if_changed ("${pch_stub_src}" "${pch_stub_src_text}")
endif ()
# Build the arguments list for calling the compiler
set (pch_args "")
get_directory_property (pch_definitions COMPILE_DEFINITIONS)
foreach (pch_def ${pch_definitions})
list (APPEND pch_args "-D${pch_def}")
endforeach ()
# Add all the current include directories
get_directory_property (pch_dirinc INCLUDE_DIRECTORIES)
list(REMOVE_DUPLICATES pch_dirinc)
foreach (pch_inc ${pch_dirinc})
set(pch_inc_system OFF)
if (CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES)
get_filename_component(pch_inc_abs "${pch_inc}" REALPATH)
foreach(implicit_inc ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
get_filename_component(implicit_inc_abs "${implicit_inc}" REALPATH)
if (pch_inc_abs STREQUAL implicit_inc_abs)
set(pch_inc_system ON)
break()
endif()
endforeach()
endif()
if (NOT pch_inc_system)
list (APPEND pch_args "-I${pch_inc}")
endif()
endforeach ()
# The OSX deployment target must match as well
if (APPLE AND (PCH_GCC OR PCH_CLANG))
if (CMAKE_OSX_DEPLOYMENT_TARGET)
list(APPEND pch_args
"-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
endif()
endif ()
# Extra flag passed from the caller
list(APPEND pch_args ${extra_compile_flags})
# Some versions of gcc are not smart enough to identify the file type
if (PCH_GCC OR PCH_CLANG)
list(APPEND pch_args "-x" "c++-header")
endif ()
set (pch_generated "")
# Helper internal macro: note that it depends on variables defined later on
macro(_PCH_ADD_COMMAND)
if (PCH_GCC OR PCH_CLANG)
list (APPEND pch_args "-c" "-o" "${pch_filename}"
"${pch_header_filename}")
elseif (PCH_INTEL)
list (APPEND pch_args "-c" "-pch-create" "${pch_filename}"
"-I" "${pch_header_path}" "${pch_stub_src}")
endif ()
get_filename_component(_pch_location "${pch_filename}" PATH)
add_custom_command (OUTPUT "${pch_filename}"
COMMAND "${CMAKE_COMMAND}" -E make_directory "${_pch_location}"
COMMAND "${CMAKE_CXX_COMPILER}" "${CMAKE_CXX_COMPILER_ARG1}"
${args_cxx} ${pch_args}
DEPENDS "${pch_header_filename}"
IMPLICIT_DEPENDS CXX "${pch_header_filename}"
)
list (APPEND pch_generated "${pch_filename}")
unset (_pch_location)
endmacro ()
# Create the appropriate custom commands and custom target
if (CMAKE_CONFIGURATION_TYPES)
foreach (CFGNAME ${CMAKE_CONFIGURATION_TYPES})
string (CONFIGURE "${pch_dir_cfgname}" pch_dir @ONLY)
string (CONFIGURE "${pch_filename_cfgname}" pch_filename @ONLY)
pvt_config_flags (${CFGNAME} args_cxx)
_PCH_ADD_COMMAND ()
endforeach ()
else ()
set (CFGNAME ".")
string (CONFIGURE "${pch_dir_cfgname}" pch_dir @ONLY)
string (CONFIGURE "${pch_filename_cfgname}" pch_filename @ONLY)
if (CMAKE_BUILD_TYPE)
pvt_config_flags (${CMAKE_BUILD_TYPE} args_cxx)
else ()
set (args_cxx "${CMAKE_CXX_FLAGS}")
separate_arguments (args_cxx)
endif ()
_PCH_ADD_COMMAND ()
endif ()
# Set the properties on the generated files
set_source_files_properties (${pch_generated} PROPERTIES
GENERATED ON
HEADER_ONLY ON)
set (CFGNAME "${CMAKE_CFG_INTDIR}")
string (CONFIGURE "${pch_filename_cfgname}" pch_filename_final @ONLY)
set (${out_pch_filename} ${pch_filename_final} PARENT_SCOPE)
endfunction ()
# Helper macro to set up the rules to create the PCH, add the dependencies
# and set up the appropriate include directories.
# The second to last argument is optional, it is the extra_compile_flags.
# The last argument is also optional, it is a specific subdirectory on which
# the PCH will be created for gcc and clang. Note that when this is used,
# the same value needs to be provided in PVT_PCH_USE
macro (PVT_PCH_SOURCES_GROUP header_filename_orig group_name
out_extrasrcs_var out_pch_filename_var pch_optional_extra_compile_flags
pch_optional_subdir)
set (pch_generated "")
pvc_increment_pch_count ()
get_filename_component(header_filename "${header_filename_orig}" ABSOLUTE)
if (PCH_MSVC)
PVT_ADD_PCH_RULE_MSVC ("${header_filename}" pch_generated
"${pch_optional_subdir}")
set (${out_pch_target_var} "")
set (${out_pch_filename_var} "")
else ()
PVT_ADD_PCH_RULE ("${header_filename}" pch_generated
${out_pch_filename_var} "${pch_optional_extra_compile_flags}"
"${pch_optional_subdir}")
endif ()
set (${out_extrasrcs_var} "${header_filename}" ${pch_generated})
source_group ("${group_name}" FILES ${${out_extrasrcs_var}})
endmacro ()
# The implementation forces the inclusion of the precompiled header in all
# C++ sources. Note that the sources var "srcs_var" ought not to include
# the PCH stub source file.
# The last argument is optional, it is a specific subdirectory on which
# the PCH will be created for gcc and clang. Note that when this is used,
# the same value needs to be provided in PVT_PCH_SOURCES_GROUP
macro (PVT_PCH_USE pch_header_filename pch_filename target_name srcs_var
pch_optional_subdir)
get_filename_component (pch_header "${pch_header_filename}" NAME)
# Assuming that the precompiled header is C++, the C files need to be
# either compiled as C++ or not use the PCH. Objective C files cannot
# use a C++ precompiled header at all.
set (has_only_cxx_sources ON)
foreach (pch_src ${${srcs_var}})
if (pch_src MATCHES ".+\\.([cC]|[mM][mM])$")
set (has_only_cxx_sources OFF)
break ()
endif ()
endforeach ()
if (PCH_MSVC)
set (pch_flags " /Yu\"${pch_header}\" /FI\"${pch_header}\"")
elseif (PCH_GCC OR PCH_CLANG)
# FIXME: this is coupled with the internal behavior of PVT_ADD_PCH_RULE
set(pch_subdir "${pch_optional_subdir}")
if(NOT pch_subdir)
pvt_get_pch_count (pch_count)
set(pch_subdir "pch.${pch_count}")
endif()
set (pch_flags
"-include \"${pch_subdir}/${CMAKE_CFG_INTDIR}/${pch_header}\"")
elseif (PCH_INTEL)
set (pch_flags "-pch-use \"${pch_filename}\"")
else ()
message (AUTHOR_WARNING "Unknown PCH environment")
endif ()
# If all sources are C++, set the property for the target, otherwise set
# it in each file separately
if (has_only_cxx_sources)
set_property (TARGET ${target_name} APPEND PROPERTY
COMPILE_FLAGS "${pch_flags}")
else ()
foreach (pch_src ${${srcs_var}})
if (pch_src MATCHES ".+\\.[cCpPxX][cCpPxX]+$")
set_property (SOURCE ${pch_src} APPEND PROPERTY
COMPILE_FLAGS "${pch_flags}")
endif()
endforeach ()
endif ()
# Add the dependencies
foreach (pch_src ${${srcs_var}})
if (pch_src MATCHES ".+\\.[cCpPxX][cCpPxX]+$")
set_property (SOURCE ${pch_src} PROPERTY
OBJECT_DEPENDS "${pch_filename}")
endif()
endforeach ()
endmacro ()
# Adds a library using a common PCH.
# Usage:
# pch_add_library(name [SHARED | MODULE | STATIC]
# [EXCLUDE_FROM_ALL]
# PCH_HEADER <header>
# source1 source2 ... sourceN)
function (pch_add_library _libname)
CMAKE_PARSE_ARGUMENTS (_pch "SHARED;MODULE;STATIC;EXCLUDE_FROM_ALL" "PCH_HEADER" "" ${ARGN})
if (NOT _pch_PCH_HEADER)
message (FATAL_ERROR "Missing PCH header!")
endif ()
set (_libsrcs ${_pch_UNPARSED_ARGUMENTS})
# Poor man's n-ary xor
set (_pch_count 0)
set (_pch_libtype "")
if (_pch_SHARED)
set (_pch_libtype "SHARED")
math (EXPR _pch_count "${_pch_count} + 1")
endif ()
if (_pch_MODULE)
set (_pch_libtype "MODULE")
math (EXPR _pch_count "${_pch_count} + 1")
endif ()
if (_pch_STATIC)
set (_pch_libtype "STATIC")
math (EXPR _pch_count "${_pch_count} + 1")
endif ()
if (_pch_count GREATER 1)
message (AUTHOR_WARNING "More than one library type specified. Using \"${_pch_libtype}\"")
endif ()
if (_pch_EXCLUDE_FROM_ALL)
set (_pch_exclude "EXCLUDE_FROM_ALL")
endif ()
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND
(PCH_GCC OR PCH_CLANG OR PCH_INTEL))
set (pch_extra_compile_flags "-fPIC")
endif ()
string(REPLACE " " "_" _pch_subdir "${_libname}_pch")
PVT_PCH_SOURCES_GROUP ("${_pch_PCH_HEADER}" "PCH Sources"
_pch_srcs _pch_filename "${pch_extra_compile_flags}" ${_pch_subdir})
add_library (${_libname} ${_pch_libtype} ${_pch_exclude}
${_libsrcs} ${_pch_srcs})
PVT_PCH_USE ("${_pch_PCH_HEADER}" "${_pch_filename}" ${_libname}
_libsrcs ${_pch_subdir})
if (NOT PCH_MSVC AND _pch_filename)
add_custom_target("${_libname}_pch" DEPENDS "${_pch_filename}")
add_dependencies(${_libname} "${_libname}_pch")
endif()
endfunction ()
# Adds an executable using a common PCH.
# Usage:
# pch_add_executable(name [WIN32] [MACOSX_BUNDLE]
# [EXCLUDE_FROM_ALL]
# PCH_HEADER <header>
# source1 source2 ... sourceN)
function (pch_add_executable _exename)
CMAKE_PARSE_ARGUMENTS (_pch "WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL" "PCH_HEADER" "" ${ARGN})
if (NOT _pch_PCH_HEADER)
message (FATAL_ERROR "Missing PCH header!")
endif ()
set (_exesrcs ${_pch_UNPARSED_ARGUMENTS})
if (_pch_WIN32)
set (_pch_exetype "WIN32")
endif ()
if (_pch_MACOSX_BUNDLE)
set (_pch_exetype "MACOSX_BUNDLE")
endif ()
if (_pch_EXCLUDE_FROM_ALL)
set (_pch_exclude "EXCLUDE_FROM_ALL")
endif ()
if (_pch_WIN32 AND _pch_MACOSX_BUNDLE)
message (AUTHOR_WARNING "Both WIN32 and MACOSX_BUNDLE selected. Using \"${_pch_exetype}\".")
endif ()
string(REPLACE " " "_" _pch_subdir "${_exename}_pch")
PVT_PCH_SOURCES_GROUP ("${_pch_PCH_HEADER}" "PCH Sources"
_pch_srcs _pch_filename "" ${_pch_subdir})
add_executable (${_exename} ${_pch_exetype} ${_pch_exclude}
${_exesrcs} ${_pch_srcs})
PVT_PCH_USE ("${_pch_PCH_HEADER}" "${_pch_filename}" ${_exename}
_exesrcs ${_pch_subdir})
if (NOT PCH_MSVC AND _pch_filename)
add_custom_target("${_exename}_pch" DEPENDS "${_pch_filename}")
add_dependencies(${_exename} "${_exename}_pch")
endif()
endfunction ()

View File

@ -0,0 +1,125 @@
# Dependencies installation, bundle fixup and CPack
if (NOT MTS_VERSION)
message(FATAL_ERROR "Use the top level configuration file")
endif()
include (CMakeDependentOption)
# Offer an option to automatically bundle qt4image through BundleUtilities
include(CMakeDependentOption)
if(APPLE OR WIN32)
set(MTS_FIXUP_BUNDLE_DEFAULT ON)
else()
set(MTS_FIXUP_BUNDLE_DEFAULT OFF)
endif()
option(MTS_FIXUP_BUNDLE "Automatically bundle all mitsuba dependencies."
${MTS_FIXUP_BUNDLE_DEFAULT})
if (APPLE)
set(MTS_QT_PLUGIN_DEST "${MTS_BUNDLE_NAME}/Contents/qt4plugins")
set(MTS_QTCONF_DEST "${MTS_BUNDLE_RESOURCES}")
elseif (WIN32)
set(MTS_QT_PLUGIN_DEST "qt4plugins")
set(MTS_QTCONF_DEST ".")
else ()
set(MTS_QT_PLUGIN_DEST "bin/qt4plugins")
set(MTS_QTCONF_DEST "bin")
endif()
# Install the needed Qt plugins
if (MTS_FIXUP_BUNDLE AND QT4_FOUND AND BUILD_GUI AND
NOT(QT_CONFIG MATCHES "static"))
set (MTS_BUNDLE_QTPLUGINS TRUE)
else ()
set (MTS_BUNDLE_QTPLUGINS FALSE)
endif ()
# Imageformats, excluding svg,mng and gif (most likely not actually used by mitsuba)
if(MTS_BUNDLE_QTPLUGINS AND EXISTS "${QT_PLUGINS_DIR}/imageformats")
if(NOT WIN32 OR NOT (QT_QTGUI_LIBRARY_RELEASE AND QT_QTGUI_LIBRARY_DEBUG))
install(DIRECTORY "${QT_PLUGINS_DIR}/imageformats"
DESTINATION "${MTS_QT_PLUGIN_DEST}"
COMPONENT "Runtime"
REGEX ".+(d4\\.dll|_debug\\.(dylib|so))$" EXCLUDE
REGEX "svg|mng|gif" EXCLUDE)
else()
# There are different plugins for release and debug
install(DIRECTORY "${QT_PLUGINS_DIR}/imageformats"
DESTINATION "${MTS_QT_PLUGIN_DEST}"
COMPONENT "Runtime" CONFIGURATIONS Debug
FILES_MATCHING
REGEX ".+(d4\\.dll|_debug\\.(dylib|so))$"
REGEX "svg|mng|gif|\\.pdb$|\\.lib$" EXCLUDE)
install(DIRECTORY "${QT_PLUGINS_DIR}/imageformats"
DESTINATION "${MTS_QT_PLUGIN_DEST}"
COMPONENT "Runtime" CONFIGURATIONS Release MinSizeRel RelWithDebInfo
REGEX ".+(d4\\.dll|_debug\\.(dylib|so))$" EXCLUDE
REGEX "svg|mng|gif|\\.pdb$|\\.lib$" EXCLUDE)
endif()
endif()
# Bearer management (introduced with Qt 4.7)
if(MTS_BUNDLE_QTPLUGINS AND EXISTS "${QT_PLUGINS_DIR}/bearer")
if(NOT WIN32 OR NOT (QT_QTNETWORK_LIBRARY_RELEASE AND QT_QTNETWORK_LIBRARY_DEBUG))
install(DIRECTORY "${QT_PLUGINS_DIR}/bearer"
DESTINATION "${MTS_QT_PLUGIN_DEST}"
COMPONENT "Runtime"
REGEX ".+(d4\\.dll|_debug\\.(dylib|so))$" EXCLUDE)
else()
# There are different plugins for release and debug
install(DIRECTORY "${QT_PLUGINS_DIR}/bearer"
DESTINATION "${MTS_QT_PLUGIN_DEST}"
COMPONENT "Runtime" CONFIGURATIONS Debug
FILES_MATCHING
REGEX ".+(d4\\.dll|_debug\\.(dylib|so))$"
REGEX "\\.pdb$|\\.lib$" EXCLUDE)
install(DIRECTORY "${QT_PLUGINS_DIR}/bearer"
DESTINATION "${MTS_QT_PLUGIN_DEST}"
COMPONENT "Runtime" CONFIGURATIONS Release MinSizeRel RelWithDebInfo
REGEX ".+(d4\\.dll|_debug\\.(dylib|so))$" EXCLUDE
REGEX "\\.pdb$|\\.lib$" EXCLUDE)
endif()
endif()
# The Cocoa version needs extra resources
set(QTCOCOA_MENU_NIB "${QT_QTGUI_LIBRARY}/Resources/qt_menu.nib")
if(MTS_FIXUP_BUNDLE AND QT4_FOUND AND QT_MAC_USE_COCOA
AND EXISTS "${QTCOCOA_MENU_NIB}")
install(CODE "
message(STATUS \"Copying qt_menu.nib into the Bundle resources\")
file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${MTS_BUNDLE_RESOURCES}/qt_menu.nib\")
execute_process(COMMAND \${CMAKE_COMMAND} -E copy_directory
\"${QTCOCOA_MENU_NIB}\"
\"\${CMAKE_INSTALL_PREFIX}/${MTS_BUNDLE_RESOURCES}/qt_menu.nib\")
" COMPONENT "Runtime")
endif()
if (MTS_BUNDLE_QTPLUGINS)
install(CODE "
message(STATUS \"Writing qt.conf\")
file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${MTS_QTCONF_DEST}/qt.conf\"
\"[Paths]
Plugins = qt4plugins
\")
" COMPONENT "Runtime")
endif ()
if (MTS_FIXUP_BUNDLE)
# Construct the list of directories with the currently set up libraries as
# a way to automate "fixup_bundle" as much as possible
mts_library_paths (MTS_LIBPATHS)
configure_file ("MtsFixupBundle.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/MtsFixupBundle.cmake" @ONLY)
install (SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/MtsFixupBundle.cmake"
COMPONENT Runtime)
endif () # MTS_FIXUP_BUNDLE

View File

@ -0,0 +1,130 @@
# Fixup bundle script generated at configure time. It expects that the
# following variables are set:
# BUILD_GUI
# MTS_LIBPATHS (the result of calling mts_library_paths)
# MTS_BUNDLE_NAME
# MTS_EXE_DEST
# MTS_LIB_DEST
# MTS_PLUGIN_DEST
# MTS_PYTHON_DEST
message (STATUS "Running Mitsuba Fixup Bundle script...")
# Copy the stand alone dynamic libraries into @executable_path/../Frameworks
# instead of the default @executable_path/../MacOS.
if (APPLE)
# gp_item_default_embedded_path item default_embedded_path_var
#
# Return the path that others should refer to the item by when the item
# is embedded inside a bundle.
#
# Override on a per-project basis by providing a project-specific
# gp_item_default_embedded_path_override function
#
function (gp_item_default_embedded_path_override item default_embedded_path_var)
if(item MATCHES "\\.dylib$" AND ${${default_embedded_path_var}} STREQUAL "@executable_path/../MacOS")
set(path "@executable_path/../Frameworks")
set(${default_embedded_path_var} "${path}" PARENT_SCOPE)
endif()
endfunction ()
# GP_RESOLVE_ITEM(<context> <item> <exepath> <dirs> <resolved_item_var> <resolved_var>)
#
# Resolve an item into an existing full path file.
# Override on a per-project basis by providing a project-specific
# gp_resolve_item_override function.
#
function (gp_resolve_item_override context item exepath dirs resolved_item_var resolved_var)
set (dependency_dest "${CMAKE_INSTALL_PREFIX}/@MTS_LIB_DEST@")
if (item MATCHES "^libmitsuba.+\\.dylib$")
# Since the bundle script runs after installation, the mitsuba libraries
# are already in their destination location
set (ri "${dependency_dest}/${item}")
set (${resolved_item_var} "${ri}" PARENT_SCOPE)
set (${resolved_var} 1 PARENT_SCOPE)
elseif (item MATCHES "^@rpath/.+")
# The first time CMake call this function, the dependencies have not been
# copied. In the first pass they will be resolved to their external
# locations so that they may be copied into the bundle. In the fixup pass
# they will be resolved to their embedded locations
foreach(depdir "${dependency_dest}" ${dirs})
string (REGEX REPLACE "^@rpath/(.+)" "\@depdir\@/\\1" ri_temp "${item}")
string (CONFIGURE "${ri_temp}" ri @ONLY)
if(EXISTS "${ri}")
set (${resolved_item_var} "${ri}" PARENT_SCOPE)
set (${resolved_var} 1 PARENT_SCOPE)
return()
endif()
endforeach()
elseif (item MATCHES "^@(executable|loader)_path/\\.\\./[Ff]rameworks/.+")
# The same applies for the frameworks
foreach(depdir "${dependency_dest}" ${dirs})
string (REGEX REPLACE "^@(executable|loader)_path/\\.\\./[Ff]rameworks/(.+)" "\@depdir\@/\\2" ri_temp "${item}")
string (CONFIGURE "${ri_temp}" ri @ONLY)
if(EXISTS "${ri}")
set (${resolved_item_var} "${ri}" PARENT_SCOPE)
set (${resolved_var} 1 PARENT_SCOPE)
return()
endif()
endforeach()
endif ()
endfunction ()
# As of CMake 2.8.5 there seems to be a bug: the override version only takes
# two arguments: the resolved filename and type_var
function (gp_resolved_file_type_override file type_var)
if ("${${type_var}}" STREQUAL "other")
set (base_preffix "${CMAKE_INSTALL_PREFIX}/@MTS_LIB_DEST@/")
string (LENGTH "${base_preffix}" min_embedded_len)
string (LENGTH "${file}" file_len)
if (file_len GREATER min_embedded_len)
string(SUBSTRING "${file}" 0 ${min_embedded_len} file_substr)
if (file_substr STREQUAL base_preffix)
set (${type_var} "embedded" PARENT_SCOPE)
endif ()
endif ()
endif()
endfunction ()
elseif (WIN32)
# Resolve the python library as a system component
function (gp_resolve_item_override context item exepath dirs resolved_item_var resolved_var)
if (item MATCHES "^python[23][0-9]\\.dll$")
set (ri "C:/Windows/System32/${item}")
set (${resolved_item_var} "${ri}" PARENT_SCOPE)
set (${resolved_var} 1 PARENT_SCOPE)
endif ()
endfunction ()
endif ()
# Get all the installed mitsuba and Qt plugins
file (GLOB MTSPLUGINS
"${CMAKE_INSTALL_PREFIX}/@MTS_PLUGIN_DEST@/*${CMAKE_SHARED_LIBRARY_SUFFIX}")
file (GLOB_RECURSE QTPLUGINS
"${CMAKE_INSTALL_PREFIX}/@MTS_QT_PLUGIN_DEST@/*${CMAKE_SHARED_LIBRARY_SUFFIX}")
# Get the python bindings as well
file (GLOB PYBINDINGS "${CMAKE_INSTALL_PREFIX}/@MTS_PYTHON_DEST@/*")
# Get an executable or just the bundle name for fixup
if (NOT DEFINED BUILD_GUI)
set (BUILD_GUI @BUILD_GUI@)
endif ()
if (NOT APPLE OR NOT BUILD_GUI)
get_filename_component(EXEDIR "${CMAKE_INSTALL_PREFIX}/@MTS_EXE_DEST@" ABSOLUTE)
file (GLOB mts_exes "${EXEDIR}/mts*${CMAKE_EXECUTABLE_SUFFIX}")
list (GET mts_exes 0 APP)
else ()
get_filename_component(APP "${CMAKE_INSTALL_PREFIX}/@MTS_BUNDLE_NAME@" ABSOLUTE)
endif ()
set (libpaths "@MTS_LIBPATHS@")
# Use our custom version of fixup_bundle, which supports @rpath on OS X
list(APPEND CMAKE_MODULE_PATH "@CMAKE_MODULE_PATH@")
include("MtsBundleUtilities")
mts_fixup_bundle("${APP}" "${MTSPLUGINS};${QTPLUGINS};${PYBINDINGS}" "${libpaths}")

View File

@ -70,5 +70,25 @@
<string>MTS_VERSION</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>BreakpadProductDisplay</key>
<string>Mitsuba</string>
<key>BreakpadProduct</key>
<string>Mitsuba/OSX</string>
<key>BreakpadVersion</key>
<string>MTS_VERSION</string>
<key>BreakpadURL</key>
<string>http://www.mitsuba-renderer.org/bugreport.php</string>
<key>BreakpadReportInterval</key>
<string>10</string>
<key>BreakpadSkipConfirm</key>
<string>NO</string>
<key>BreakpadSendAndExit</key>
<string>YES</string>
<key>BreakpadRequestEmail</key>
<string>YES</string>
<key>BreakpadRequestComments</key>
<string>YES</string>
<key>BreakpadVendor</key>
<string>the Mitsuba authors</string>
</dict>
</plist>

74
data/darwin/Info.plist.in Normal file
View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>xml</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>mitsuba.icns</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>text/xml</string>
<string>application/xml</string>
</array>
<key>CFBundleTypeName</key>
<string>XML document</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>TEXT</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>NSDocumentClass</key>
<string>MitsubaDoc</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>exr</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>mitsuba.icns</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>image/x-exr</string>
</array>
<key>CFBundleTypeName</key>
<string>OpenEXR image</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>EXR</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>NSDocumentClass</key>
<string>MitsubaDoc</string>
</dict>
</array>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleExecutable</key>
<string>mtsgui</string>
<key>CFBundleIconFile</key>
<string>mitsuba.icns</string>
<key>CFBundleIdentifier</key>
<string>org.mitsuba.Mitsuba</string>
<key>CFBundleName</key>
<string>Mitsuba</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>@MTS_VERSION@</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
</plist>

BIN
data/darwin/PreviewSettings.nib generated Normal file

Binary file not shown.

Binary file not shown.

View File

@ -2,10 +2,10 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1060</int>
<string key="IBDocument.SystemVersion">10F569</string>
<string key="IBDocument.InterfaceBuilderVersion">804</string>
<string key="IBDocument.AppKitVersion">1038.29</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<string key="IBDocument.SystemVersion">11E53</string>
<string key="IBDocument.InterfaceBuilderVersion">931</string>
<string key="IBDocument.AppKitVersion">1138.47</string>
<string key="IBDocument.HIToolboxVersion">569.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
@ -15,18 +15,17 @@
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>804</string>
<string>931</string>
<string>1.2.5</string>
</object>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="4"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.brandonwalkin.BWToolkit</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.brandonwalkin.BWToolkit</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -56,9 +55,10 @@
<string key="NSWindowTitle">Preview settings</string>
<string key="NSWindowClass">NSPanel</string>
<nil key="NSViewClass"/>
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<nil key="NSUserInterfaceItemIdentifier"/>
<string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
<object class="NSView" key="NSWindowView" id="554226948">
<reference key="NSNextResponder"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -86,7 +86,7 @@
<string key="NSColorName">controlColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2ODY1AA</bytes>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor" id="400574078">
@ -114,7 +114,7 @@
<object class="NSFont" key="NSSupport" id="26">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">11</double>
<int key="NSfFlags">3100</int>
<int key="NSfFlags">3088</int>
</object>
<reference key="NSControlView" ref="509807381"/>
<reference key="NSBackgroundColor" ref="788086777"/>
@ -179,6 +179,7 @@
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="115729368"/>
</object>
<!--
<object class="NSMenuItem" id="838264870">
<reference key="NSMenu" ref="364878546"/>
<string key="NSTitle">OpenGL (single pass)</string>
@ -190,28 +191,7 @@
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="115729368"/>
</object>
<object class="NSMenuItem" id="627447399">
<reference key="NSMenu" ref="364878546"/>
<string key="NSTitle">Coherent ray tracing</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="58463257"/>
<reference key="NSMixedImage" ref="15575325"/>
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="115729368"/>
</object>
<object class="NSMenuItem" id="1020772667">
<reference key="NSMenu" ref="364878546"/>
<string key="NSTitle">Standard ray tracing</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="58463257"/>
<reference key="NSMixedImage" ref="15575325"/>
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="115729368"/>
</object>
-->
</object>
</object>
<int key="NSPreferredEdge">1</int>
@ -811,12 +791,12 @@
</object>
</object>
<string key="NSFrameSize">{303, 338}</string>
<reference key="NSSuperview"/>
<bool key="NSViewIsLayerTreeHost">YES</bool>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
@ -1193,9 +1173,7 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="720481184"/>
<reference ref="838264870"/>
<reference ref="627447399"/>
<reference ref="1020772667"/>
<!-- <reference ref="838264870"/> -->
<reference ref="513017064"/>
</object>
<reference key="parent" ref="115729368"/>
@ -1205,16 +1183,12 @@
<reference key="object" ref="720481184"/>
<reference key="parent" ref="364878546"/>
</object>
<!--
<object class="IBObjectRecord">
<int key="objectID">13</int>
<reference key="object" ref="838264870"/>
<reference key="parent" ref="364878546"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">14</int>
<reference key="object" ref="627447399"/>
<reference key="parent" ref="364878546"/>
</object>
</object>-->
<object class="IBObjectRecord">
<int key="objectID">15</int>
<reference key="object" ref="1013100074"/>
@ -1299,11 +1273,6 @@
<reference key="object" ref="1036662978"/>
<reference key="parent" ref="369415728"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">43</int>
<reference key="object" ref="1020772667"/>
<reference key="parent" ref="364878546"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">142</int>
<reference key="object" ref="576758915"/>
@ -2372,8 +2341,8 @@ dXIgcmF5cyBhdCBhIHRpbWUgdXNpbmcgU1NFMi4</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{9, 8}</string>
<string>{7, 2}</string>
<string>{11, 11}</string>
<string>{10, 3}</string>
<string>{15, 15}</string>
</object>
</object>

View File

@ -0,0 +1,4 @@
#!/bin/bash
cp /opt/intel/composer_xe_*/compiler/lib/libiomp5.dylib Mitsuba.app/Contents/Frameworks
find Mitsuba.app/Contents/MacOS/ Mitsuba.app/plugins -type f | xargs -n 1 install_name_tool -change libiomp5.dylib @rpath/libiomp5.dylib
find Mitsuba.app/Contents/Frameworks/libmitsuba-* -type f | xargs -n 1 install_name_tool -change libiomp5.dylib @rpath/libiomp5.dylib

2
data/darwin/crash_report.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
dependencies/bin/crash_report -S symbols64/ $@ | less

10
data/darwin/extract-symbols.sh Executable file
View File

@ -0,0 +1,10 @@
rm -Rf symbols32 symbols64
dependencies/bin/symbolstore.py -a "i386" dependencies/bin/dump_syms symbols32 \
`find Mitsuba.app -type f -and \( -name *.dylib -or -name mtsgui -or -name mitsuba -or -name mtsutil \)` \
dependencies/frameworks/QtCore.framework/QtCore dependencies/frameworks/QtGui.framework/QtGui dependencies/frameworks/QtNetwork.framework/QtNetwork \
dependencies/frameworks/QtXml.framework/QtXml dependencies/frameworks/QtXmlPatterns.framework/QtXmlPatterns dependencies/frameworks/QtOpenGL.framework/QtOpenGL
dependencies/bin/symbolstore.py -a "x86_64" dependencies/bin/dump_syms symbols64 \
`find Mitsuba.app -type f -and \( -name *.dylib -or -name mtsgui -or -name mitsuba -or -name mtsutil \)` \
dependencies/frameworks/QtCore.framework/QtCore dependencies/frameworks/QtGui.framework/QtGui dependencies/frameworks/QtNetwork.framework/QtNetwork \
dependencies/frameworks/QtXml.framework/QtXml dependencies/frameworks/QtXmlPatterns.framework/QtXmlPatterns dependencies/frameworks/QtOpenGL.framework/QtOpenGL

19
data/darwin/lipo.sh Executable file
View File

@ -0,0 +1,19 @@
rm -Rf Mitsuba.app
cp -R Mitsuba64.app/ Mitsuba.app
for i in Mitsuba32.app/plugins/*; do
base=$(basename $i)
echo "Running lipo on $base"
lipo -create Mitsuba32.app/plugins/$base Mitsuba64.app/plugins/$base -output Mitsuba.app/plugins/$base
done
for i in Mitsuba32.app/Contents/MacOS/*; do
base=$(basename $i)
echo "Running lipo on $base"
lipo -create Mitsuba32.app/Contents/MacOS/$base Mitsuba64.app/Contents/MacOS/$base -output Mitsuba.app/Contents/MacOS/$base
done
for i in Mitsuba32.app/Contents/Frameworks/libmitsuba*; do
base=$(basename $i)
echo "Running lipo on $base"
lipo -create Mitsuba32.app/Contents/Frameworks/$base Mitsuba64.app/Contents/Frameworks/$base -output Mitsuba.app/Contents/Frameworks/$base
done
lipo -create Mitsuba32.app/python/2.6/mitsuba.so Mitsuba64.app/python/2.6/mitsuba.so -output Mitsuba.app/python/2.6/mitsuba.so
lipo -create Mitsuba32.app/python/2.7/mitsuba.so Mitsuba64.app/python/2.7/mitsuba.so -output Mitsuba.app/python/2.7/mitsuba.so

52
data/darwin/qmake_fake.c Normal file
View File

@ -0,0 +1,52 @@
/* Minimal QMake stub to trick CMake into using the Mitsuba Qt distribution */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
#include <libgen.h>
#include <mach-o/dyld.h>
/* Qt version currently provided in the Mitsuba dependencies */
#define QT_VERSION "4.8.2"
void printUsage(FILE* out)
{
fprintf(out, "Usage: qmake -query <QT_VERSION|QT_INSTALL_HEADERS>\n\n");
fprintf(out, "This is a minimal QMake stub so that CMake may find "
"the Qt distribution bundled with the Mitsuba dependencies.\n");
}
int main(int argc, char **argv)
{
if (argc != 3) {
fprintf(stderr, "***Unknown options\n");
printUsage(stderr);
return 1;
} else if (strcmp(argv[1], "-query") != 0) {
fprintf(stderr, "***Unknown option %s\n", argv[1]);
printUsage(stderr);
return 1;
}
/* Derive the dependencies name from the executable */
char tmpbuf1[PATH_MAX + 1];
char tmpbuf2[PATH_MAX + 1];
int32_t bufsize = sizeof(tmpbuf1);
_NSGetExecutablePath(tmpbuf1, &bufsize);
const char *exe_dir = dirname(tmpbuf1);
strcpy(tmpbuf2, exe_dir);
strcat(tmpbuf2, "/../");
const char* dependencies_dir = realpath(tmpbuf2, tmpbuf1);
if (strcmp(argv[2], "QT_VERSION") == 0) {
puts(QT_VERSION);
}
else if (strcmp(argv[2], "QT_INSTALL_HEADERS") == 0) {
printf("%s/include\n", dependencies_dir);
}
else {
puts("**Unknown**");
return 101;
}
return 0;
}

2
data/darwin/strip-symbols.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
strip -S Mitsuba.app/plugins/* Mitsuba.app/Contents/Frameworks/*.dylib Mitsuba.app/Contents/MacOS/* Mitsuba.app/python/*/*

View File

@ -2,7 +2,7 @@
#
# This file is part of Mitsuba, a physically based rendering system.
#
# Copyright (c) 2007-2010 by Wenzel Jakob and others.
# Copyright (c) 2007-2012 by Wenzel Jakob and others.
#
# Mitsuba is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License Version 3
@ -335,7 +335,7 @@ if len(sys.argv) == 1:
print('')
print(' Mitsuba Amazon EC2 instance launcher')
print('')
print(' Copyright (C) 2007-2011 by Wenzel Jakob and others. This is free software;')
print(' Copyright (C) 2007-2012 by Wenzel Jakob and others. This is free software;')
print(' see the source for copying conditions. There is NO warranty; not even for')
print(' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.')
print('')

33
data/ior/CMakeLists.txt Normal file
View File

@ -0,0 +1,33 @@
# IOR Database
if (NOT MTS_VERSION)
message(FATAL_ERROR "Use the top level configuration file")
endif()
if (WIN32 OR MTS_SIMPLE_PATHS)
set(IOR_DESTINATION "data/ior")
elseif (APPLE)
set(IOR_DESTINATION "${MTS_BUNDLE_NAME}/data/ior")
else()
set(IOR_DESTINATION "share/mitsuba/data/ior")
endif()
set (IOR_DIR "${PROJECT_BINARY_DIR}/binaries/${CMAKE_CFG_INTDIR}/${IOR_DESTINATION}")
# Actual installation
install(DIRECTORY "."
DESTINATION "${IOR_DESTINATION}"
FILE_PERMISSIONS "OWNER_READ" "GROUP_READ" "WORLD_READ"
COMPONENT Runtime
FILES_MATCHING PATTERN "*.spd"
)
# Custom target wich creates a phony file, just to flag that the database
# has already been copied
add_custom_command(OUTPUT "${IOR_DIR}/.iordatabase.flag"
COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}" "${IOR_DIR}"
COMMAND "${CMAKE_COMMAND}" -E remove -f "${IOR_DIR}/CMakeLists.txt"
COMMAND "${CMAKE_COMMAND}" -E touch "${IOR_DIR}/.iordatabase.flag"
COMMENT "Copying IOR database directory"
)
add_custom_target (ior_database DEPENDS "${IOR_DIR}/.iordatabase.flag")
set_target_properties (ior_database PROPERTIES FOLDER "data")

View File

@ -17,14 +17,8 @@ _hgrepo="mitsuba"
build() {
cd ${_hgrepo}
cp build/config-linux.py config.py
if [ -e dependencies ]; then
cd dependencies
hg pull -u
cd ..
else
hg clone https://www.mitsuba-renderer.org/hg/dependencies
fi
hg update bidir-0.4.0 # TODO: remove
cp build/config-linux-gcc.py config.py
scons --jobs=$[${MAKEFLAGS/-j/} - 1]
}
@ -36,10 +30,11 @@ package() {
${pkgdir}/usr/share/mitsuba/plugins \
${pkgdir}/usr/share/mitsuba/data/schema \
${pkgdir}/usr/share/mitsuba/data/ior \
${pkgdir}/usr/share/mitsuba/data/microfacet \
${pkgdir}/usr/share/applications \
${pkgdir}/usr/share/pixmaps \
${pkgdir}/usr/include/mitsuba/{core,hw,render,bidir} \
${pkgdir}/usr/lib/python2.7/lib-dynload
${pkgdir}/usr/lib/python3.2/lib-dynload
cd ${_hgrepo}
install -m755 dist/mitsuba dist/mtsgui dist/mtsimport dist/mtssrv dist/mtsutil ${pkgdir}/usr/bin
@ -51,7 +46,8 @@ package() {
install -m755 dist/plugins/* ${pkgdir}/usr/share/mitsuba/plugins
install -m644 dist/data/schema/* ${pkgdir}/usr/share/mitsuba/data/schema
install -m644 dist/data/ior/* ${pkgdir}/usr/share/mitsuba/data/ior
install -m644 dist/python/mitsuba.so ${pkgdir}/usr/lib/python2.7/lib-dynload
install -m644 dist/data/microfacet/* ${pkgdir}/usr/share/mitsuba/data/microfacet
install -m644 dist/python/3.2/mitsuba.so ${pkgdir}/usr/lib/python3.2/lib-dynload
install -m644 data/linux/mitsuba.desktop ${pkgdir}/usr/share/applications
install -m644 src/mtsgui/resources/mitsuba48.png ${pkgdir}/usr/share/pixmaps
install -m644 include/mitsuba/*.h ${pkgdir}/usr/include/mitsuba

View File

@ -1,3 +1,24 @@
mitsuba (0.4.0-1) unstable; urgency=low
* New bidirectional rendering algorithms: Bidirectional path tracing,
Primary sample space MLT, Path space MLT, Energy redistribution path
tracing, Manifold exploration
* New framework for representing sensors and emitters
* Vastly improved realtime preview that scales to big scenes
* Crop/Zoom/Multiple sensor support
* Redesigned skylight emitter based on work by Hosek and Wilkie
* Improved texturing system with support for high quality resampling,
out-of-core textures, and anisotropic texture filtering
* Sobol, Halton, and Hammersley Quasi Monte Carlo point set generators
* Fixed a handedness problem that affected all cameras
* Flexible bitmap I/O with support for many new output formats
* Reimplemented dipole subsurface scattering integrator
* SSE-based CPU tonemapper & Mersenne Twister implementation
* All threading code was mooved over to boost::thread
* The build system can now simultaneously deal with several versions of Python
* Other new plugins: blendbsdf, thindielectric
* New CMake-based build system
-- Wenzel Jakob <wenzel@cs.cornell.edu> Thu, 27 Sep 2012 00:00:00 -0400
mitsuba (0.3.1-1) unstable; urgency=low
* Photon mapper: The photon mapper had some serious issues in the

View File

@ -6,15 +6,17 @@ Build-Depends: debhelper (>= 7), build-essential, scons, qt4-dev-tools,
libpng12-dev, libjpeg62-dev, libilmbase-dev, libopenexr-dev,
libxerces-c-dev, libboost-dev, libglewmx1.5-dev, libxxf86vm-dev,
collada-dom-dev, libboost-system-dev, libboost-filesystem-dev,
libboost-python-dev, libgl1-mesa-dev, libglu1-mesa-dev, pkg-config
libboost-python-dev, libboost-thread-dev, libgl1-mesa-dev,
libglu1-mesa-dev, pkg-config, libeigen3-dev
Standards-Version: 3.8.3
Homepage: http://www.mitsuba-renderer.org
Package: mitsuba
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libqt4-core, libqt4-gui, libqt4-network, libqt4-opengl, libqt4-xml, libpng12-0, libjpeg62,
libilmbase6, libopenexr6, libxerces-c3.1, libboost-filesystem1.42.0,
libboost-system1.42.0, libboost-python1.42.0, libglewmx1.5,
Depends: ${shlibs:Depends}, ${misc:Depends}, libqt4-core, libqt4-gui,
libqt4-network, libqt4-opengl, libqt4-xml, libpng12-0, libjpeg62,
libilmbase6, libopenexr6, libxerces-c3.1, libboost-filesystem1.46.0,
libboost-system1.46.0, libboost-python1.46.0, libglewmx1.5,
libxxf86vm1, collada-dom, libgl1-mesa-glx, libglu1-mesa
Description: Mitsuba renderer
Mitsuba is an extensible rendering framework written in portable C++. It implements unbiased as well as biased techniques and contains heavy optimizations targeted towards current CPU architectures.
@ -28,7 +30,8 @@ Architecture: any
Depends: qt4-dev-tools, libpng12-dev, libjpeg62-dev, libilmbase-dev,
libopenexr-dev, libxerces-c-dev, libboost-dev, libglewmx1.5-dev,
libxxf86vm-dev, collada-dom-dev, libboost-system-dev,
libboost-filesystem-dev, libboost-python-dev, mitsuba
libboost-filesystem-dev, libboost-python-dev, libboost-thread-dev,
libeigen3-dev, mitsuba
Description: Mitsuba renderer -- development files
Mitsuba is an extensible rendering framework written in portable C++. It implements unbiased as well as biased techniques and contains heavy optimizations targeted towards current CPU architectures.
.

View File

@ -7,7 +7,7 @@ dist/libmitsuba-hw.so /usr/lib
dist/libmitsuba-render.so /usr/lib
dist/libmitsuba-core.so /usr/lib
dist/libmitsuba-bidir.so /usr/lib
dist/python/mitsuba.so /usr/lib/pymodules/pythonPYTHONVERSION
dist/python/PYTHONVERSION/mitsuba.so /usr/lib/pymodules/pythonPYTHONVERSION
dist/plugins/* /usr/share/mitsuba/plugins
dist/data/* /usr/share/mitsuba/data
src/mtsgui/resources/mitsuba48.png /usr/share/pixmaps

View File

@ -14,7 +14,7 @@ PYTHONVERSION = `python-config --includes | sed -e 's/^.*python\([0-9\.]*\).*/\1
clean:
dh_testdir
dh_testroot
cp build/config-linux.py config.py
cp build/config-linux-gcc.py config.py
scons -c
rm -f build-stamp configure-stamp
rm -Rf .sconsign.dblite .sconf_temp/
@ -26,7 +26,7 @@ configure:
binary-arch:
dh_testdir
dh_testroot
cp build/config-linux.py config.py
cp build/config-linux-gcc.py config.py
scons -j 2
dh_installdirs
dh_auto_install

View File

@ -1,6 +1,5 @@
CPPFLAGS = -I ../../../include -I /usr/include/freetype2
LDFLAGS = -lfreetype -L ../../../src/libcore -L ../../../src/libhw \
-lmitsuba-core -lmitsuba-hw
CPPFLAGS = -I ../../../include -I /usr/include/freetype2 -DSINGLE_PRECISION -DSPECTRUM_SAMPLES=3
LDFLAGS = -lfreetype -L../../../dist -lmitsuba-core -lmitsuba-hw -lboost_filesystem
all: bin2c fontgen

View File

@ -48,6 +48,7 @@ struct Glyph {
int main(int argc, char **argv) {
Class::staticInitialization();
Object::staticInitialization();
Thread::staticInitialization();
Logger::staticInitialization();
@ -133,9 +134,9 @@ int main(int argc, char **argv) {
uint32_t xcount = (uint32_t) std::floor((float) finalSide / (float) maxWidth);
/* Create an bitmap with alpha */
ref<Bitmap> bitmap = new Bitmap(finalSide, finalSide, 16);
ref<Bitmap> bitmap = new Bitmap(Bitmap::ELuminance, Bitmap::EUInt8, Vector2i(finalSide));
bitmap->clear();
uint8_t *data = bitmap->getData();
uint8_t *data = bitmap->getUInt8Data();
ref<FileStream> fs = new FileStream(argv[3], FileStream::ETruncReadWrite);
fs->setByteOrder(Stream::ENetworkByteOrder);
@ -158,14 +159,11 @@ int main(int argc, char **argv) {
uint32_t width = face->glyph->bitmap.width;
uint32_t height = face->glyph->bitmap.rows;
/* 32-Bit RGBA is quite wasteful for a font,
* Luminance-Alpha would be much nicer .. */
for (uint32_t j=0; j<height; j++) {
uint8_t *dest = &data[((ypos+j) * finalSide + xpos) * 2];
uint8_t *dest = &data[((ypos+j) * finalSide + xpos)];
for (uint32_t o=0; o<width; o++) {
/* Copy pixel-by pixel */
*dest++ = 0xFF;
*dest++ = *buffer++;
}
}
@ -201,7 +199,7 @@ int main(int argc, char **argv) {
fs->close();
fs = new FileStream(argv[2], FileStream::ETruncReadWrite);
bitmap->save(Bitmap::EPNG, fs);
bitmap->write(Bitmap::EPNG, fs);
fs->close();
delete[] kerningMatrix;
@ -209,6 +207,7 @@ int main(int argc, char **argv) {
FT_Done_Face(face);
FT_Done_FreeType(library);
Class::staticShutdown();
Object::staticShutdown();
Thread::staticShutdown();
return 0;
}

View File

@ -0,0 +1,41 @@
# Microfacet precomputed data
if (NOT MTS_VERSION)
message(FATAL_ERROR "Use the top level configuration file")
endif()
if (WIN32 OR MTS_SIMPLE_PATHS)
set(MICROFACET_DESTINATION "data/microfacet")
elseif (APPLE)
set(MICROFACET_DESTINATION "${MTS_BUNDLE_NAME}/data/microfacet")
else()
set(MICROFACET_DESTINATION "share/mitsuba/data/microfacet")
endif()
# Copy the microfacet data into the output directory, mainly for easier debugging
set (MICROFACET_DIR "${PROJECT_BINARY_DIR}/binaries/${CMAKE_CFG_INTDIR}/${MICROFACET_DESTINATION}")
add_custom_command (
OUTPUT "${MICROFACET_DIR}/beckmann.dat"
"${MICROFACET_DIR}/ggx.dat"
"${MICROFACET_DIR}/phong.dat"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/beckmann.dat" "${MICROFACET_DIR}/beckmann.dat"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/ggx.dat" "${MICROFACET_DIR}/ggx.dat"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/phong.dat" "${MICROFACET_DIR}/phong.dat"
DEPENDS "beckmann.dat" "ggx.dat" "phong.dat"
COMMENT "Copying microfacet precomputed data"
)
add_custom_target (microfacet_data
DEPENDS "${MICROFACET_DIR}/beckmann.dat"
"${MICROFACET_DIR}/ggx.dat"
"${MICROFACET_DIR}/phong.dat"
)
set_target_properties (microfacet_data PROPERTIES FOLDER "data")
# Actual installation
install(FILES "beckmann.dat" "ggx.dat" "phong.dat"
DESTINATION ${MICROFACET_DESTINATION}
PERMISSIONS "OWNER_READ" "GROUP_READ" "WORLD_READ"
COMPONENT Runtime
)

View File

@ -0,0 +1,57 @@
/*
This file is part of Mitsuba, a physically based rendering system.
Copyright (c) 2007-2012 by Wenzel Jakob and others.
Mitsuba is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License Version 3
as published by the Free Software Foundation.
Mitsuba is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef _MSC_VER
# pragma once
#endif
#if !defined(__MITSUBA_PRECOMPILED_HPP)
#define __MITSUBA_PRECOMPILED_HPP
// Includes from mitsuba/mitsuba.h
#include <mitsuba/core/platform.h>
#include <boost/version.hpp>
#include <sstream>
#include <string>
#include <map>
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <stdexcept>
#include <limits>
#include <mitsuba/core/constants.h>
#include <mitsuba/core/fwd.h>
#include <mitsuba/render/fwd.h>
#include <mitsuba/core/stl.h>
#include <mitsuba/core/object.h>
#include <mitsuba/core/ref.h>
#include <mitsuba/core/tls.h>
#include <mitsuba/core/logger.h>
#include <mitsuba/core/thread.h>
#include <mitsuba/core/vector.h>
#include <mitsuba/core/point.h>
#include <mitsuba/core/normal.h>
#include <mitsuba/core/spectrum.h>
#include <mitsuba/core/util.h>
#endif /* __MITSUBA_PRECOMPILED_HPP */

View File

@ -0,0 +1,41 @@
# Scene XML Schema and XSL transformer
if (NOT MTS_VERSION)
message(FATAL_ERROR "Use the top level configuration file")
endif()
if (WIN32 OR MTS_SIMPLE_PATHS)
set(SCHEMA_DESTINATION "data/schema")
elseif (APPLE)
set(SCHEMA_DESTINATION "${MTS_BUNDLE_NAME}/data/schema")
else()
set(SCHEMA_DESTINATION "share/mitsuba/data/schema")
endif()
# Copy the XML components into the output directory, mainly for easier debugging
set (SCHEMA_DIR "${PROJECT_BINARY_DIR}/binaries/${CMAKE_CFG_INTDIR}/${SCHEMA_DESTINATION}")
add_custom_command (
OUTPUT "${SCHEMA_DIR}/scene.xsd"
"${SCHEMA_DIR}/upgrade_0.3.0.xsl"
"${SCHEMA_DIR}/upgrade_0.4.0.xsl"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/scene.xsd" "${SCHEMA_DIR}/scene.xsd"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/upgrade_0.3.0.xsl" "${SCHEMA_DIR}/upgrade_0.3.0.xsl"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_CURRENT_SOURCE_DIR}/upgrade_0.4.0.xsl" "${SCHEMA_DIR}/upgrade_0.4.0.xsl"
MAIN_DEPENDENCY "scene.xsd"
DEPENDS "scene.xsd" "upgrade_0.3.0.xsl" "upgrade_0.4.0.xsl"
COMMENT "Copying XML data: scene schema and upgrade XSL files"
)
add_custom_target (scene_schema
DEPENDS "${SCHEMA_DIR}/scene.xsd"
"${SCHEMA_DIR}/upgrade_0.3.0.xsl" "${SCHEMA_DIR}/upgrade_0.4.0.xsl"
)
set_target_properties (scene_schema PROPERTIES FOLDER "data")
# Actual installation
install(FILES "scene.xsd" "upgrade_0.3.0.xsl" "upgrade_0.4.0.xsl"
DESTINATION ${SCHEMA_DESTINATION}
PERMISSIONS "OWNER_READ" "GROUP_READ" "WORLD_READ"
COMPONENT Runtime
)

View File

@ -4,11 +4,11 @@
<xsd:element name="scene">
<xsd:complexType>
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="camera" type="camera"/>
<xsd:element name="sensor" type="sensor"/>
<xsd:element name="texture" type="texture"/>
<xsd:element name="bsdf" type="bsdf"/>
<xsd:element name="integrator" type="integrator"/>
<xsd:element name="luminaire" type="luminaire"/>
<xsd:element name="emitter" type="emitter"/>
<xsd:element name="shape" type="shape"/>
<xsd:element name="medium" type="medium"/>
<xsd:element name="phase" type="phase"/>
@ -25,6 +25,8 @@
<xsd:element name="rgb" type="rgb"/>
<xsd:element name="srgb" type="string"/>
<xsd:element name="blackbody" type="blackbody"/>
<xsd:element name="alias" type="alias"/>
</xsd:choice>
<xsd:attribute name="version" type="xsd:string"/>
</xsd:complexType>
@ -77,8 +79,8 @@
<xsd:attribute name="id" type="xsd:string" use="required"/>
</xsd:complexType>
<!-- CAMERA Element -->
<xsd:complexType name="camera">
<!-- SENSOR Element -->
<xsd:complexType name="sensor">
<xsd:complexContent>
<xsd:extension base="objectBase">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
@ -86,11 +88,12 @@
<xsd:element name="sampler" type="object"/>
<xsd:element name="film" type="film"/>
<xsd:element name="ref" type="reference"/>
<xsd:element name="medium" type="medium"/>
</xsd:choice>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<!-- INTEGRATOR Element -->
<xsd:complexType name="integrator">
<xsd:complexContent>
@ -104,22 +107,21 @@
</xsd:complexContent>
</xsd:complexType>
<!-- LUMINAIRE Element -->
<xsd:complexType name="luminaire">
<!-- EMITTER Element -->
<xsd:complexType name="emitter">
<xsd:complexContent>
<xsd:extension base="objectBase">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:group ref="objectGroup"/>
<xsd:element name="texture" type="texture"/>
<xsd:element name="luminaire" type="luminaire"/>
<xsd:element name="emitter" type="emitter"/>
<xsd:element name="medium" type="medium"/>
<xsd:element name="ref" type="reference"/>
</xsd:choice>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<!-- SHAPE Element -->
<xsd:complexType name="shape">
<xsd:complexContent>
@ -129,7 +131,8 @@
<xsd:element name="bsdf" type="bsdf"/>
<xsd:element name="subsurface" type="object"/>
<xsd:element name="ref" type="reference"/>
<xsd:element name="luminaire" type="luminaire"/>
<xsd:element name="sensor" type="sensor"/>
<xsd:element name="emitter" type="emitter"/>
<xsd:element name="shape" type="shape"/>
<xsd:element name="medium" type="medium"/>
</xsd:choice>
@ -293,12 +296,18 @@
<xsd:complexType name="include">
<xsd:attribute name="filename" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="alias">
<xsd:attribute name="id" type="xsd:string" use="required"/>
<xsd:attribute name="as" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:complexType name="transform">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="translate" type="translate"/>
<xsd:element name="rotate" type="rotate"/>
<xsd:element name="lookAt" type="lookAt"/>
<xsd:element name="lookat" type="lookAt"/>
<xsd:element name="scale" type="scale"/>
<xsd:element name="matrix" type="matrix"/>
</xsd:choice>
@ -338,6 +347,6 @@
<xsd:complexType name="blackbody">
<xsd:attribute name="name" type="xsd:string" use="required"/>
<xsd:attribute name="temperature" type="xsd:string" use="required"/>
<xsd:attribute name="multiplier" type="doubleType" use="optional"/>
<xsd:attribute name="scale" type="doubleType" use="optional"/>
</xsd:complexType>
</xsd:schema>

View File

@ -0,0 +1,128 @@
<?xml version='1.0' encoding='utf-8'?>
<!-- Stylesheet to upgrade from Mitsuba version 0.3.x to 0.4.0 scenes -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output method="xml" indent="yes" encoding="utf-8"/>
<xsl:preserve-space elements="*"/>
<!-- Update the scene version -->
<xsl:template match="scene/@version">
<xsl:attribute name="version">0.4.0</xsl:attribute>
</xsl:template>
<!-- Cameras have been renamed to sensors -->
<xsl:template match="camera">
<sensor>
<xsl:apply-templates select="@*"/>
<!-- Handle the mapSmallerSide parameter -->
<xsl:if test="@type='perspective'">
<string name="fovAxis">
<xsl:attribute name="value">
<xsl:choose>
<xsl:when test="boolean[@name='mapSmallerSide' and @value='false']">
<xsl:text>larger</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>smaller</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</string>
</xsl:if>
<xsl:apply-templates select="node()[not(@name) or @name!='mapSmallerSide']"/>
</sensor>
</xsl:template>
<!-- Fix the handedness yet once more.. -->
<xsl:template match="camera/transform[@name='toWorld']">
<transform>
<xsl:apply-templates select="@*"/>
<scale x="-1"/>
<xsl:apply-templates select="node()"/>
</transform>
</xsl:template>
<!-- Rename the 'intensity' parameter of certain luminaires to 'radiance' -->
<xsl:template match="luminaire[@type='area' or @type='constant']/node()[@name='intensity']/@name">
<xsl:attribute name="name">radiance</xsl:attribute>
</xsl:template>
<!-- Update the 'intensity' parameter of directional light sources -->
<xsl:template match="luminaire[@type='directional']/node()[@name='intensity']/@name">
<xsl:attribute name="name">irradiance</xsl:attribute>
</xsl:template>
<!-- Rename the luminaireSamples parameter of the direct sampling strategy -->
<xsl:template match="integrator/node()[@name='luminaireSamples']/@name">
<xsl:attribute name="name">emitterSamples</xsl:attribute>
</xsl:template>
<!-- Rename the depth parameter of samplers -->
<xsl:template match="sampler/node()[@name='depth']/@name">
<xsl:attribute name="name">dimension</xsl:attribute>
</xsl:template>
<!-- Update the name of the errctrl plugin -->
<xsl:template match="integrator[@type='errctrl']/@type">
<xsl:attribute name="type">adaptive</xsl:attribute>
</xsl:template>
<!-- Update the name of the exrfilm plugin -->
<xsl:template match="film[@type='exrfilm']/@type">
<xsl:attribute name="type">hdrfilm</xsl:attribute>
</xsl:template>
<!-- Translate the 'alpha' parameter in the old films -->
<xsl:template match="film/boolean[@name='alpha']">
<xsl:choose>
<xsl:when test="@value='true'">
<string name="pixelFormat" value="rgba"/>
</xsl:when>
<xsl:otherwise>
<string name="pixelFormat" value="rgb"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Update the name of the pngfilm plugin -->
<xsl:template match="film[@type='pngfilm']/@type">
<xsl:attribute name="type">ldrfilm</xsl:attribute>
</xsl:template>
<!-- Update the 'focusDepth' attribute name -->
<xsl:template match="float[@name='focusDepth']/@name">
<xsl:attribute name="name">focusDistance</xsl:attribute>
</xsl:template>
<!-- Update the 'intensityScale' attribute name -->
<xsl:template match="float[@name='intensityScale']/@name">
<xsl:attribute name="name">scale</xsl:attribute>
</xsl:template>
<!-- Update the 'densityMultiplier' attribute name -->
<xsl:template match="float[@name='densityMultiplier']/@name">
<xsl:attribute name="name">scale</xsl:attribute>
</xsl:template>
<!-- Update the blackbody 'multiplier' attribute name -->
<xsl:template match="blackbody/@multiplier">
<xsl:attribute name="scale"><xsl:value-of select="."/></xsl:attribute>
</xsl:template>
<!-- Luminaires have been renamed to emitters -->
<xsl:template match="luminaire">
<emitter>
<xsl:apply-templates select="@*|node()"/>
</emitter>
</xsl:template>
<!-- Default copy rule -->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

View File

@ -111,7 +111,16 @@ def generate(env):
else:
raise Exception('Unknown version of visual studio!')
icpp_path = os.environ.get('ICPP_COMPOSER2011')
if 'ICPP_COMPOSER2011' in os.environ:
icpp_path = os.environ.get('ICPP_COMPOSER2011')
elif 'ICPP_COMPILER12' in os.environ:
icpp_path = os.environ.get('ICPP_COMPILER12')
elif 'ICPP_COMPOSER2013' in os.environ:
icpp_path = os.environ.get('ICPP_COMPOSER2013')
elif 'ICPP_COMPILER13' in os.environ:
icpp_path = os.environ.get('ICPP_COMPILER13')
else:
raise Exception('Could not find any of the ICCPP_* environment variables!')
merge_script_vars(env, os.path.join(icpp_path, 'bin/iclvars.bat'), arch + ' ' + vsrelease)
env['REDIST_PATH'] = os.path.join(os.path.join(os.path.join(icpp_path, 'redist'), arch_redist), 'compiler')

View File

@ -243,12 +243,14 @@ def generate(env):
Builder = SCons.Builder.Builder
splitext = SCons.Util.splitext
env['QTDIR'] = _detect(env)
env['QTDIR'] = env.GetBuildPath(_detect(env))
# TODO: 'Replace' should be 'SetDefault'
# env.SetDefault(
env.Replace(
QTDIR = _detect(env),
QT4_BINPATH = os.path.join('$QTDIR', 'bin'),
QT4_LIBPATH = os.path.join('$QTDIR', 'lib'),
# TODO: This is not reliable to QTDIR value changes but needed in order to support '-qt4' variants
QT4_MOC = locateQt4Command(env,'moc', env['QTDIR']),
QT4_UIC = locateQt4Command(env,'uic', env['QTDIR']),
@ -281,14 +283,14 @@ def generate(env):
QT4_MOCINCFLAGS = '$( ${_concat(QT4_MOCINCPREFIX, QT4_MOCCPPPATH, INCSUFFIX, __env__, RDirs)} $)',
# Commands for the qt support ...
QT4_UICCOM = '$QT4_UIC $QT4_UICFLAGS -o $TARGET $SOURCE',
QT4_MOCFROMHCOM = '$QT4_MOC $QT4_MOCFROMHFLAGS $QT4_MOCINCFLAGS -o $TARGET $SOURCE',
QT4_UICCOM = '"$QT4_UIC" $QT4_UICFLAGS -o $TARGET $SOURCE',
QT4_MOCFROMHCOM = '"$QT4_MOC" $QT4_MOCFROMHFLAGS $QT4_MOCINCFLAGS -o $TARGET $SOURCE',
QT4_MOCFROMCXXCOM = [
'$QT4_MOC $QT4_MOCFROMCXXFLAGS $QT4_MOCINCFLAGS -o $TARGET $SOURCE',
Action(checkMocIncluded,None)],
QT4_LUPDATECOM = '$QT4_LUPDATE $SOURCE -ts $TARGET',
QT4_LRELEASECOM = '$QT4_LRELEASE $SOURCE',
QT4_RCCCOM = '$QT4_RCC $QT4_QRCFLAGS $SOURCE -o $TARGET',
QT4_LUPDATECOM = '"$QT4_LUPDATE" $SOURCE -ts $TARGET',
QT4_LRELEASECOM = '"$QT4_LRELEASE" $SOURCE',
QT4_RCCCOM = '"$QT4_RCC" $QT4_QRCFLAGS $SOURCE -o $TARGET',
)
# Translation builder
@ -459,11 +461,11 @@ def enable_modules(self, modules, debug=False, crosscompiling=False) :
self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include","qt4","QtAssistant")])
pcmodules.remove("QtAssistant")
pcmodules.append("QtAssistantClient")
if sys.platform == "linux2":
if sys.platform == 'linux2':
self.ParseConfig('pkg-config %s --libs --cflags'% ' '.join(pcmodules))
else:
elif sys.platform == 'darwin':
for module in pcmodules:
self.AppendUnique(CPPPATH="/Library/Frameworks/%s.framework/Versions/4/Headers" % module)
#self.AppendUnique(CPPPATH="$QTDIR/frameworks/%s.framework/Versions/4/Headers" % module)
self.Append(LINKFLAGS=['-framework', module])
self["QT4_MOCCPPPATH"] = self["CPPPATH"]
return
@ -493,37 +495,6 @@ def enable_modules(self, modules, debug=False, crosscompiling=False) :
self["QT4_MOCCPPPATH"] = self["CPPPATH"]
self.AppendUnique(LIBPATH=[os.path.join('$QTDIR','lib')])
return
"""
if sys.platform=="darwin" :
# TODO: Test debug version on Mac
self.AppendUnique(LIBPATH=[os.path.join('$QTDIR','lib')])
self.AppendUnique(LINKFLAGS="-F$QTDIR/lib")
self.AppendUnique(LINKFLAGS="-L$QTDIR/lib") #TODO clean!
if debug : debugSuffix = 'd'
for module in modules :
# self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include")])
# self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include",module)])
# port qt4-mac:
self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include", "qt4")])
self.AppendUnique(CPPPATH=[os.path.join("$QTDIR","include", "qt4", module)])
if module in staticModules :
self.AppendUnique(LIBS=[module+debugSuffix]) # TODO: Add the debug suffix
self.AppendUnique(LIBPATH=[os.path.join("$QTDIR","lib")])
else :
# self.Append(LINKFLAGS=['-framework', module])
# port qt4-mac:
self.Append(LIBS=module)
if 'QtOpenGL' in modules:
self.AppendUnique(LINKFLAGS="-F/System/Library/Frameworks")
self.Append(LINKFLAGS=['-framework', 'AGL']) #TODO ughly kludge to avoid quotes
self.Append(LINKFLAGS=['-framework', 'OpenGL'])
self["QT4_MOCCPPPATH"] = self["CPPPATH"]
return
# This should work for mac but doesn't
# env.AppendUnique(FRAMEWORKPATH=[os.path.join(env['QTDIR'],'lib')])
# env.AppendUnique(FRAMEWORKS=['QtCore','QtGui','QtOpenGL', 'AGL'])
"""
def exists(env):
return _detect(env)

View File

@ -0,0 +1,31 @@
<scene version="0.4.0">
<integrator type="ptracer"/>
<shape type="disk">
<transform name="toWorld">
<translate z="-1"/>
</transform>
<bsdf type="diffuse"/>
<sensor type="irradiancemeter">
<sampler type="independent">
<integer name="sampleCount" value="128000"/>
</sampler>
<film type="mfilm"/>
</sensor>
</shape>
<shape type="disk">
<boolean name="flipNormals" value="true"/>
<bsdf type="diffuse"/>
<transform name="toWorld">
<translate z="1"/>
</transform>
<emitter type="area">
<spectrum name="radiance" value="1"/>
</emitter>
</shape>
</scene>

View File

@ -0,0 +1,15 @@
<scene version="0.4.0">
<sensor type="radiancemeter">
<transform name="toWorld">
<lookAt origin="0, 0, -1" target="0, 0, 0"/>
</transform>
</sensor>
<emitter type="collimated">
<spectrum name="power" value="1"/>
<transform name="toWorld">
<lookAt origin="0, 0, 1" target="0, 0, 0"/>
</transform>
</emitter>
</scene>

View File

@ -0,0 +1,34 @@
<scene version="0.4.0">
<medium id="medium" type="homogeneous">
<spectrum name="sigmaS" value="0"/>
<spectrum name="sigmaA" value="1"/>
</medium>
<shape type="disk">
<transform name="toWorld">
<translate z="-1"/>
</transform>
<bsdf type="diffuse"/>
<sensor type="irradiancemeter"/>
</shape>
<shape type="disk">
<ref id="medium" name="exterior"/>
</shape>
<shape type="disk">
<boolean name="flipNormals" value="true"/>
<bsdf type="diffuse"/>
<transform name="toWorld">
<translate z="1"/>
</transform>
<emitter type="area">
<spectrum name="radiance" value="1"/>
</emitter>
<ref name="exterior" id="medium"/>
</shape>
</scene>

View File

@ -1,7 +1,17 @@
<!-- This file defines a series of BSDF instances
to be tested for consistency. This is done
using the testcase 'test_chisquare' -->
<scene version="0.3.0">
<scene version="0.4.0">
<!-- Test the smooth plastic model with preserveColors=false -->
<bsdf type="plastic">
<boolean name="preserveColors" value="false"/>
</bsdf>
<!-- Test the smooth plastic model with preserveColors=true -->
<bsdf type="plastic">
<boolean name="preserveColors" value="true"/>
</bsdf>
<!-- Test the smooth diffuse model -->
<bsdf type="diffuse"/>
@ -118,16 +128,6 @@
<float name="alphaV" value="0.3"/>
</bsdf>
<!-- Test the smooth plastic model with preserveColors=false -->
<bsdf type="plastic">
<boolean name="preserveColors" value="false"/>
</bsdf>
<!-- Test the smooth plastic model with preserveColors=true -->
<bsdf type="plastic">
<boolean name="preserveColors" value="true"/>
</bsdf>
<!-- Test the rough plastic model with the
Beckmann microfacet distribution -->
<bsdf type="roughplastic">

View File

@ -1,18 +1,18 @@
<!-- This file defines a series of luminaire instances
<!-- This file defines a series of emitter instances
to be tested for consistency. This is done using the
testcase 'test_chisquare' -->
<scene version="0.3.0">
<!-- Test the constant luminaire
<luminaire type="constant"/>
<scene version="0.4.0">
<!-- Test the emitter emitter
<emitter type="emitter"/>
-->
<!-- Test the environment map luminaire -->
<luminaire type="envmap">
<!-- Test the environment map emitter -->
<emitter type="envmap">
<string name="filename" value="data/tests/envmap.exr"/>
<transform name="toWorld">
<rotate x="1" angle="40"/>
</transform>
</luminaire>
</emitter>
<!-- Make sure that the scene actually contains something -->
<shape type="sphere"/>

View File

@ -0,0 +1,3 @@
Remove-Item -Recurse -Force symbols
mkdir symbols
Get-ChildItem build -include *.pdb -recurse | foreach ($_) { python dependencies\bin\symbolstore.py dependencies\bin\dump_syms_x86 symbols $_.fullname }

View File

@ -1,51 +1,36 @@
from lxml import etree
import os, string, shutil, uuid
doc2008 = etree.parse('data/windows/mitsuba-msvc2008.vcproj.template')
doc2010 = etree.parse('data/windows/mitsuba-msvc2010.vcxproj.template')
doc2010_filters = etree.parse('data/windows/mitsuba-msvc2010.vcxproj.filters.template')
headers2008 = etree.XPath('/VisualStudioProject/Files/Filter[@Name="Header Files"]')(doc2008)[0]
sources2008 = etree.XPath('/VisualStudioProject/Files/Filter[@Name="Source Files"]')(doc2008)[0]
ns = {'n' : 'http://schemas.microsoft.com/developer/msbuild/2003'}
headers2010 = etree.XPath('/n:Project/n:ItemGroup[@Label="Header Files"]', namespaces = ns)(doc2010)[0]
sources2010 = etree.XPath('/n:Project/n:ItemGroup[@Label="Source Files"]', namespaces = ns)(doc2010)[0]
headers2010_filters = etree.XPath('/n:Project/n:ItemGroup[@Label="Header Files"]', namespaces = ns)(doc2010_filters)[0]
sources2010_filters = etree.XPath('/n:Project/n:ItemGroup[@Label="Source Files"]', namespaces = ns)(doc2010_filters)[0]
filters2010 = etree.XPath('/n:Project/n:ItemGroup[@Label="Filters"]', namespaces = ns)(doc2010_filters)[0]
def traverse(dirname, prefix, base2008):
def traverse(dirname, prefix):
for file in [file for file in os.listdir(dirname) if not file in ['.', '..']]:
filename = os.path.join(dirname, file)
if os.path.isdir(filename):
lastname = os.path.split(filename)[1]
# Visual Studio 2008 nodes
node2008 = etree.SubElement(base2008, 'Filter')
node2008.set('Name', lastname)
node2008.tail = '\n\t\t'
node2008.text = '\n\t\t'
# Visual Studio 2010 nodes
subprefix = os.path.join(prefix, lastname)
node2010 = etree.SubElement(filters2010, 'Filter')
node2010.set('Include', subprefix)
node2010.set('Include', subprefix.replace('/', '\\'))
ui = etree.SubElement(node2010, 'UniqueIdentifier')
ui.text = '{' + str(uuid.uuid4()) + '}'
ui.tail = '\n\t\t'
node2010.tail = '\n\t\t'
node2010.text = '\n\t\t\t'
traverse(filename, subprefix, node2008)
traverse(filename, subprefix)
else:
ext = os.path.splitext(filename)[1]
filename = '..\\' + filename
# Visual Studio 2008 nodes
if ext == '.cpp' or ext == '.c' or ext == '.h' or ext == '.inl':
node = etree.SubElement(base2008, 'File')
node.set('RelativePath', filename)
node.tail = '\n\t\t'
filename = '..\\' + filename.replace('/', '\\')
prefix = prefix.replace('/', '\\')
# Visual Studio 2010 nodes
if ext == '.cpp' or ext == '.c':
@ -74,12 +59,8 @@ def traverse(dirname, prefix, base2008):
filter.tail = '\n\t\t'
traverse('.\\src', 'Source Files', sources2008)
traverse('.\\include', 'Header Files', headers2008)
of = open('build/mitsuba-msvc2008.vcproj', 'w')
of.write(etree.tostring(doc2008, pretty_print=True))
of.close()
traverse('src', 'Source Files')
traverse('include', 'Header Files')
of = open('build/mitsuba-msvc2010.vcxproj', 'w')
of.write(etree.tostring(doc2010, pretty_print=True))
@ -88,6 +69,3 @@ of.close()
of = open('build/mitsuba-msvc2010.vcxproj.filters', 'w')
of.write(etree.tostring(doc2010_filters, pretty_print=True))
of.close()
shutil.copyfile('data/windows/mitsuba-msvc2008.sln.template', 'build/mitsuba-msvc2008.sln')
shutil.copyfile('data/windows/mitsuba-msvc2010.sln.template', 'build/mitsuba-msvc2010.sln')

View File

@ -1,26 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mitsuba", "mitsuba-msvc2008.vcproj", "{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}.Debug|Win32.ActiveCfg = Debug|Win32
{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}.Debug|Win32.Build.0 = Debug|Win32
{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}.Debug|x64.ActiveCfg = Debug|x64
{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}.Debug|x64.Build.0 = Debug|x64
{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}.Release|Win32.ActiveCfg = Release|Win32
{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}.Release|Win32.Build.0 = Release|Win32
{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}.Release|x64.ActiveCfg = Release|x64
{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -1,121 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="mitsuba"
ProjectGUID="{BA3C2621-9FB1-4348-9059-AFC8CCAB25E9}"
RootNamespace="mitsuba"
Keyword="MakeFileProj"
TargetFrameworkVersion="0"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="0"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win32-debug.py"
ReBuildCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win32-debug.py -c &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win32-debug.py"
CleanCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win32-debug.py -c"
Output="..\dist\mtsgui.exe"
PreprocessorDefinitions="WIN32;_DEBUG;"
IncludeSearchPath="..\include"
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="0"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win32.py"
ReBuildCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win32.py -c &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win32.py"
CleanCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win32.py -c"
Output="..\dist\mtsgui.exe"
PreprocessorDefinitions="WIN32;NDEBUG;SINGLE_PRECISION"
IncludeSearchPath="..\include"
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="0"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win64-debug.py"
ReBuildCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win64-debug.py -c &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win64-debug.py"
CleanCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win64-debug.py -c"
Output="..\dist\mtsgui.exe"
PreprocessorDefinitions="WIN32;_DEBUG;"
IncludeSearchPath="..\include"
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="0"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win64.py"
ReBuildCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win64.py -c &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win64.py"
CleanCommandLine="cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2008-win64.py -c"
Output="..\dist\mtsgui.exe"
PreprocessorDefinitions="WIN32;NDEBUG;SINGLE_PRECISION"
IncludeSearchPath="..\include"
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -56,9 +56,9 @@
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2010-win32-debug.py</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2010-win32-debug.py -c &amp;&amp; scons --parallelize --cfg=build\config-msvc2010-win32-debug.py</NMakeReBuildCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2010-win32-debug.py -c</NMakeCleanCommandLine>
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-win32-msvc2010-debug.py</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-win32-msvc2010-debug.py -c &amp;&amp; scons --parallelize --cfg=build\config-win32-msvc2010-debug.py</NMakeReBuildCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-win32-msvc2010-debug.py -c</NMakeCleanCommandLine>
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\dist\mtsgui.exe</NMakeOutput>
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\include;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
@ -67,9 +67,9 @@
<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2010-win32.py</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2010-win32.py -c &amp;&amp; scons --parallelize --cfg=build\config-msvc2010-win32.py</NMakeReBuildCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2010-win32.py -c</NMakeCleanCommandLine>
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-win32-msvc2010.py</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-win32-msvc2010.py -c &amp;&amp; scons --parallelize --cfg=build\config-win32-msvc2010.py</NMakeReBuildCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-win32-msvc2010.py -c</NMakeCleanCommandLine>
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\dist\mtsgui.exe</NMakeOutput>
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;SINGLE_PRECISION;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\include;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
@ -78,9 +78,9 @@
<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Debug\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Debug\</IntDir>
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2010-win64-debug.py</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2010-win64-debug.py -c &amp;&amp; scons --parallelize --cfg=build\config-msvc2010-win64-debug.py</NMakeReBuildCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2010-win64-debug.py -c</NMakeCleanCommandLine>
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-win64-msvc2010-debug.py</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-win64-msvc2010-debug.py -c &amp;&amp; scons --parallelize --cfg=build\config-win64-msvc2010-debug.py</NMakeReBuildCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-win64-msvc2010-debug.py -c</NMakeCleanCommandLine>
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\dist\mtsgui.exe</NMakeOutput>
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\include;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
@ -89,9 +89,9 @@
<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Release\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Release\</IntDir>
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2010-win64.py</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2010-win64.py -c &amp;&amp; scons --parallelize --cfg=build\config-msvc2010-win64.py</NMakeReBuildCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-msvc2010-win64.py -c</NMakeCleanCommandLine>
<NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-win64-msvc2010.py</NMakeBuildCommandLine>
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-win64-msvc2010.py -c &amp;&amp; scons --parallelize --cfg=build\config-win64-msvc2010.py</NMakeReBuildCommandLine>
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">cd .. &amp;&amp; scons --parallelize --cfg=build\config-win64-msvc2010.py -c</NMakeCleanCommandLine>
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\dist\mtsgui.exe</NMakeOutput>
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WIN32;NDEBUG;SINGLE_PRECISION;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\include;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>

View File

@ -0,0 +1,75 @@
/*
This file is part of Mitsuba, a physically based rendering system.
Copyright (c) 2007-2012 by Wenzel Jakob and others.
Mitsuba is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License Version 3
as published by the Free Software Foundation.
Mitsuba is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
MSDN Documentation:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa381058%28v=vs.85%29.aspx
*/
#include <winresrc.h>
#cmakedefine01 RC_ICON
#if RC_ICON
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDI_ICON1 ICON DISCARDABLE "@RC_ICON@"
#endif
#ifdef GCC_WINDRES
VS_VERSION_INFO VERSIONINFO
#else
VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
#endif
FILEVERSION @RC_VERSION_COMMA@ /* e.g. 1,0,0,0 */
PRODUCTVERSION @RC_VERSION_COMMA@
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0
#endif
FILEOS VOS_NT_WINDOWS32
FILETYPE @RC_FILETYPE@
FILESUBTYPE 0 /* not used */
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
/* language ID = U.S. English, char set = Windows, Multilingual */
BEGIN
VALUE "CompanyName", "mitsuba-renderer.org"
VALUE "FileDescription", "@RC_DESCRIPTION@\0"
VALUE "FileVersion", "@RC_VERSION@\0"
VALUE "InternalName", "@RC_NAME@\0"
VALUE "LegalCopyright", "Copyright (c) 2007-@RC_YEAR@, Wenzel Jakob and others.\0"
VALUE "OriginalFilename", "@RC_FILENAME@\0"
VALUE "ProductName", "Mitsuba\0"
VALUE "ProductVersion", "@RC_VERSION@\0"
END
END
BLOCK "VarFileInfo"
BEGIN
/* The following line should only be modified for localized versions. */
/* It consists of any number of WORD,WORD pairs, with each pair */
/* describing a language,codepage combination supported by the file. */
/* */
/* For example, a file might have values "0x409,1252" indicating that it */
/* supports English language (0x409) in the Windows ANSI codepage (1252). */
VALUE "Translation", 0x0409, 1252
END
END

40
data/windows/qmake_fake.c Normal file
View File

@ -0,0 +1,40 @@
/* Minimal QMake stub to trick CMake into using the Mitsuba Qt distribution */
#include <stdio.h>
#include <string.h>
/*
MSVC Compile flags:
cl qmake_fake.c /nologo /Os /MT /arch:SSE2 /link /OUT:"qmake.exe"
*/
/* Qt version currently provided in the Mitsuba dependencies */
#define QT_VERSION "4.8.2"
void printUsage(FILE* out)
{
fprintf(out, "Usage: qmake -query QT_VERSION\n\n");
fprintf(out, "This is a minimal QMake stub so that CMake may find "
"the Qt distribution bundled with the Mitsuba dependencies.\n");
}
int main(int argc, char **argv)
{
if (argc != 3) {
fprintf(stderr, "***Unknown options\n");
printUsage(stderr);
return 1;
} else if (strcmp(argv[1], "-query") != 0) {
fprintf(stderr, "***Unknown option %s\n", argv[1]);
printUsage(stderr);
return 1;
}
if (strcmp(argv[2], "QT_VERSION") == 0) {
puts(QT_VERSION);
return 0;
}
else {
puts("**Unknown**");
return 101;
}
}

View File

@ -1078,7 +1078,7 @@ PAPER_TYPE = a4wide
# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
# packages that should be included in the LaTeX output.
EXTRA_PACKAGES =
EXTRA_PACKAGES = amsmath amsfonts
# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
# the generated latex document. The header should contain everything until

View File

@ -1,7 +1,13 @@
\section{Acknowledgments}
The architecture of Mitsuba as well as some individual components are based on implementations discussed in: \emph{Physically Based Rendering - From Theory To Implementation} by Matt Pharr and Greg Humphreys.
The architecture of the coherent path tracer traversal code was influenced by Radius from Thierry Berger-Perrin.
Many thanks go to my advisor Steve Marschner, who let me spend time on this project.
I am indebted to my advisor Steve Marschner for allowing me to devote
a significant amount of my research time to this project. His insightful and
encouraging suggestions have helped transform this program into much more than
I ever thought it would be.
The architecture of Mitsuba as well as some individual components are based on
implementations discussed in: \emph{Physically Based Rendering - From Theory
To Implementation} by Matt Pharr and Greg Humphreys.
Some of the GUI icons were taken from the Humanity icon set by Canonical Ltd.
The material test scene was created by Jonas Pilo, and the environment map
it uses is courtesy of Bernhard Vogl.
@ -20,20 +26,22 @@ The following people have kindly contributed code or bugfixes:
\item Marios Papas
\item Edgar Vel\'{a}zquez-Armend\'{a}riz
\item Jirka Vorba
\item Leonhard Gr\"unschlo\ss
\end{itemize}
Mitsuba makes heavy use of the following amazing libraries and tools:
\begin{itemize}
\item Qt 4 by Nokia
\item Qt 4 by Digia
\item OpenEXR by Industrial Light \& Magic
\item Xerces-C+\!+ by the Apache Foundation
\item Eigen by Beno\^it Jacob and Ga\"el Guennebaud
\item SSE math functions by Julien Pommier
\item The Boost C+\!+ class library
\item GLEW by Milan Ikits, Marcelo E. Magallon and Lev Povalahev
\item Mersenne Twister by Makoto Matsumoto and Takuji Nishimura
\item Cubature by Steven G. Johnson
\item COLLADA DOM by Sony Computer Entertainment
\item libjpeg by the Independent JPEG Group
\item libjpeg-turbo by Darrell Commander and others
\item libpng by Guy Eric Schalnat, Andreas Dilger, Glenn Randers-Pehrson and \mbox{others}
\item libply by Ares Lagae
\item BWToolkit by Brandon Walkin

View File

@ -245,3 +245,51 @@ The general usage of this command is
$\texttt{\$}$ mtsutil [options] <utility name> [arguments]
\end{shell}
For a listing of all supported options and utilities, enter the command without parameters.
\subsubsection{Tonemapper}
\label{sec:tonemapper}
One particularly useful utility that shall be mentioned here is the batch tonemapper, which
loads EXR/RGBE images and writes tonemapped 8-bit PNG/JPGs. This can save much time when one has to
process many high dynamic-range images such as animation frames using the same basic operations,
e.g. gamma correction, changing the overall brightness, resizing, cropping, etc. The available
command line options are shown in \lstref{tonemap-cli}.
\begin{console}[label=lst:tonemap-cli,caption=Command line options of the \texttt{mtsutil tonemap} utility]
$\texttt{\$}$ mtsutil tonemap
Synopsis: Loads one or more EXR/RGBE images and writes tonemapped 8-bit PNG/JPGs
Usage: mtsutil tonemap [options] <EXR/RGBE file (s)>
Options/Arguments:
-h Display this help text
-g gamma Specify the gamma value (The default is -1 => sRGB)
-m multiplier Multiply the pixel values by 'multiplier' (Default = 1)
-b r,g,b Color balance: apply the specified per-channel multipliers
-c x,y,w,h Crop: tonemap a given rectangle instead of the entire image
-s w,h Resize the output image to the specified resolution
-r x,y,w,h,i Add a rectangle at the specified position and intensity, e.g.
to make paper figures. The intensity should be in [0, 255].
-f fmt Request a certain output format (png/jpg, default:png)
-a Require the output image to have an alpha channel
-p key,burn Run Reinhard et al.'s photographic tonemapping operator. 'key'
between [0, 1] chooses between low and high-key images and
'burn' (also [0, 1]) controls how much highlights may burn out
-x Temporal coherence mode: activate this flag when tonemapping
frames of an animation using the '-p' option to avoid flicker
-o file Save the output with a given filename
-t Multithreaded: process several files in parallel
The operations are ordered as follows: 1. crop, 2. resize, 3. color-balance,
4. tonemap, 5. annotate. To simply process a directory full of EXRs in
parallel, run the following: 'mtsutil tonemap -t path-to-directory/*.exr'
\end{console}

Some files were not shown because too many files have changed in this diff Show More