Cycles: mac + scons build should not work.
[blender.git] / intern / cycles / SConscript
1 #!/usr/bin/python
2 from os import path
3 Import('env')
4
5 cycles = env.Clone()
6
7 cycles.Depends('../../source/blender/makesrna/intern/RNA_blender_cpp.h', 'makesrna')
8
9 sources = cycles.Glob('bvh/*.cpp') + cycles.Glob('device/*.cpp') + cycles.Glob('kernel/*.cpp') + cycles.Glob('render/*.cpp') + cycles.Glob('subd/*.cpp') + cycles.Glob('util/*.cpp') + cycles.Glob('util/*.c') + cycles.Glob('blender/*.cpp')
10
11 sources.remove(path.join('util', 'util_view.cpp'))
12 sources.remove(path.join('render', 'film_response.cpp'))
13
14 incs = [] 
15 defs = []
16 ccflags = []
17 cxxflags = []
18
19 defs.append('CCL_NAMESPACE_BEGIN=namespace ccl {')
20 defs.append('CCL_NAMESPACE_END=}')
21
22 defs.append('WITH_OPENCL')
23 defs.append('WITH_MULTI')
24 defs.append('WITH_CUDA')
25
26 if env['OURPLATFORM'] in ('win32-mingw'):
27         cxxflags.append('-fno-rtti -ffast-math -msse -msse2 -msse3 -mtune=native'.split())
28         ccflags.append('-ffast-math -msse -msse2 -msse3 -mtune=native'.split())
29         defs.append('BOOST_NO_RTTI BOOST_NO_TYPEID'.split())
30         
31 incs.extend('. bvh render device kernel kernel/osl kernel/svm util subd'.split())
32 incs.extend('#intern/guardedalloc #source/blender/makesrna #source/blender/makesdna'.split())
33 incs.extend('#source/blender/blenloader ../../source/blender/makesrna/intern'.split())
34 incs.extend('#extern/glew/include'.split())
35 incs.append(cycles['BF_OIIO_INC'])
36 incs.append(cycles['BF_BOOST_INC'])
37 incs.append(cycles['BF_PYTHON_INC'])
38
39 cycles.BlenderLib('bf_intern_cycles', sources, incs, defs, libtype=['intern'], priority=[0], compileflags=[None], cc_compileflags=ccflags, cxx_compileflags=cxxflags)
40