Integrated unit testing framework with scons on Linux.
[blender.git] / source / blender / blenkernel / SConscript
1 #!/usr/bin/python
2 Import ('env')
3
4 sources = env.Glob('intern/*.c')
5
6 incs = '. #/intern/guardedalloc ../editors/include ../blenlib ../makesdna'
7 incs += ' ../render/extern/include #/intern/decimation/extern ../makesrna'
8 incs += ' ../imbuf ../avi #/intern/elbeem/extern ../nodes'
9 incs += ' #/intern/iksolver/extern ../blenloader'
10 incs += ' #/extern/bullet2/src'
11 incs += ' #/intern/opennl/extern #/intern/bsp/extern'
12 incs += ' ../gpu #/extern/glew/include'
13
14 incs += ' ' + env['BF_OPENGL_INC']
15 incs += ' ' + env['BF_ZLIB_INC']
16
17 defs = []
18
19 if not env['WITH_BF_PYTHON']:
20         defs.append('DISABLE_PYTHON')
21 else:
22         incs += ' ../python'
23         incs += ' ' + env['BF_PYTHON_INC']
24         if env['BF_DEBUG']:
25                 defs.append('_DEBUG')
26
27 if env['WITH_BF_QUICKTIME']:
28         incs += ' ../quicktime'
29
30 if env['WITH_BF_SDL']:
31         incs += ' ' + env['BF_SDL_INC']
32 else:
33         defs.append('DISABLE_SDL')
34
35 if env['WITH_BF_OPENEXR']:
36         defs.append('WITH_OPENEXR')
37
38 if env['WITH_BF_OPENJPEG']:
39         defs.append('WITH_OPENJPEG')
40
41 if env['WITH_BF_DDS']:
42         defs.append('WITH_DDS')
43
44 if env['WITH_BF_FFMPEG']:
45         defs.append('WITH_FFMPEG')
46         incs += ' ' + env['BF_FFMPEG_INC']
47
48 if env['WITH_BF_QUICKTIME']:
49         defs.append('WITH_QUICKTIME')
50         incs += ' ' + env['BF_QUICKTIME_INC']
51
52 if env['WITH_BF_BULLET']:
53         defs.append('WITH_BULLET')
54
55 if env['BF_NO_ELBEEM']:
56         defs.append('DISABLE_ELBEEM')
57
58 if env['WITH_BF_LCMS']:
59         defs.append('WITH_LCMS')
60
61 if env['WITH_BF_UNIT_TEST']:
62         defs.append('WITH_UNIT_TEST')
63         
64 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
65     incs += ' ' + env['BF_PTHREADS_INC']
66
67 env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core'], priority = [165] )