Add compiles support for Cycles.
[blender-staging.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
17 defs.append('CCL_NAMESPACE_BEGIN=namespace ccl {')
18 defs.append('CCL_NAMESPACE_END=}')
19
20 defs.append('WITH_OPENCL')
21 defs.append('WITH_MULTI')
22 defs.append('WITH_CUDA')
23
24 incs.extend('. bvh render device kernel kernel/osl kernel/svm util subd'.split())
25 incs.extend('#intern/guardedalloc #source/blender/makesrna #source/blender/makesdna'.split())
26 incs.extend('#source/blender/blenloader ../../source/blender/makesrna/intern'.split())
27 incs.extend('#extern/glew/include'.split())
28 incs.append(cycles['BF_OIIO_INC'])
29 incs.append(cycles['BF_BOOST_INC'])
30 incs.append(cycles['BF_PYTHON_INC'])
31
32 cycles.BlenderLib('bf_intern_cycles', sources, incs, defs, libtype=['intern'], priority=[0] )
33