Make scons work MinGW. This commit resolves several issues such as enable OpenEXR...
[blender.git] / intern / cycles / SConscript
index dbaf52ff1757a5f7e14f674e8431cb43d51de400..725553e6d5b25b5b9db48ab611424d56b36e746d 100644 (file)
@@ -13,6 +13,8 @@ sources.remove(path.join('render', 'film_response.cpp'))
 
 incs = [] 
 defs = []
+ccflags = []
+cxxflags = []
 
 defs.append('CCL_NAMESPACE_BEGIN=namespace ccl {')
 defs.append('CCL_NAMESPACE_END=}')
@@ -21,6 +23,11 @@ defs.append('WITH_OPENCL')
 defs.append('WITH_MULTI')
 defs.append('WITH_CUDA')
 
+if env['OURPLATFORM'] in ('win32-mingw'):
+       cxxflags.append('-fno-rtti -ffast-math -msse -msse2 -msse3 -mtune=native'.split())
+       ccflags.append('-ffast-math -msse -msse2 -msse3 -mtune=native'.split())
+       defs.append('BOOST_NO_RTTI BOOST_NO_TYPEID'.split())
+       
 incs.extend('. bvh render device kernel kernel/osl kernel/svm util subd'.split())
 incs.extend('#intern/guardedalloc #source/blender/makesrna #source/blender/makesdna'.split())
 incs.extend('#source/blender/blenloader ../../source/blender/makesrna/intern'.split())
@@ -29,5 +36,5 @@ incs.append(cycles['BF_OIIO_INC'])
 incs.append(cycles['BF_BOOST_INC'])
 incs.append(cycles['BF_PYTHON_INC'])
 
-cycles.BlenderLib('bf_intern_cycles', sources, incs, defs, libtype=['intern'], priority=[0] )
+cycles.BlenderLib('bf_intern_cycles', sources, incs, defs, libtype=['intern'], priority=[0], compileflags=[None], cc_compileflags=ccflags, cxx_compileflags=cxxflags)