rename and negate DISABLE_PYTHON --> WITH_PYTHON
[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 #/intern/memutil ../editors/include'
7 incs += ' ../blenlib ../blenfont ../makesdna ../windowmanager'
8 incs += ' ../render/extern/include #/intern/decimation/extern ../makesrna'
9 incs += ' ../imbuf ../ikplugin ../avi #/intern/elbeem/extern ../nodes ../modifiers'
10 incs += ' #/intern/iksolver/extern ../blenloader'
11 incs += ' #/extern/bullet2/src'
12 incs += ' #/intern/opennl/extern #/intern/bsp/extern'
13 incs += ' ../gpu #/extern/glew/include'
14 incs += ' #/intern/smoke/extern'
15 incs += ' #/intern/audaspace/intern'
16
17 incs += ' ' + env['BF_OPENGL_INC']
18 incs += ' ' + env['BF_ZLIB_INC']
19
20 defs = [ 'GLEW_STATIC' ]
21
22 if env['WITH_BF_PYTHON']:
23     incs += ' ../python'
24     incs += ' ' + env['BF_PYTHON_INC']
25     defs.append('WITH_PYTHON')
26     if env['BF_DEBUG']:
27         defs.append('DEBUG')
28
29 if env['WITH_BF_QUICKTIME']:
30     incs += ' ../quicktime'
31
32 if env['WITH_BF_SDL']:
33     incs += ' ' + env['BF_SDL_INC']
34 else:
35     defs.append('DISABLE_SDL')
36
37 if env['WITH_BF_OPENEXR']:
38     defs.append('WITH_OPENEXR')
39
40 if env['WITH_BF_TIFF']:
41     defs.append('WITH_TIFF')
42
43 if env['WITH_BF_OPENJPEG']:
44     defs.append('WITH_OPENJPEG')
45
46 if env['WITH_BF_DDS']:
47     defs.append('WITH_DDS')
48
49 if env['WITH_BF_CINEON']:
50     defs.append('WITH_CINEON')
51
52 if env['WITH_BF_HDR']:
53     defs.append('WITH_HDR')
54
55 if env['WITH_BF_JACK']:
56     defs.append('WITH_JACK')
57
58 if env['WITH_BF_FFMPEG']:
59     defs.append('WITH_FFMPEG')
60     incs += ' ' + env['BF_FFMPEG_INC']
61
62 if env['WITH_BF_QUICKTIME']:
63     defs.append('WITH_QUICKTIME')
64     incs += ' ' + env['BF_QUICKTIME_INC']
65
66 if env['WITH_BF_BULLET']:
67     defs.append('USE_BULLET')
68
69 if env['OURPLATFORM'] == 'darwin':
70     if env['WITH_BF_OPENMP']:
71        defs.append('PARALLEL=1')
72
73 if env['BF_NO_ELBEEM']:
74     defs.append('DISABLE_ELBEEM')
75
76 if env['WITH_BF_LCMS']:
77     defs.append('WITH_LCMS')
78     incs += ' ' + env['BF_LCMS_INC']
79
80 if env['WITH_BF_LZO']:
81     incs += ' #/extern/lzo/minilzo'
82     defs.append('WITH_LZO')
83
84 if env['WITH_BF_LZMA']:
85     incs += ' #/extern/lzma'
86     defs.append('WITH_LZMA')
87
88 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
89     incs += ' ' + env['BF_PTHREADS_INC']
90
91 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
92     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [166,25]) #, cc_compileflags = env['CCFLAGS'].append('/WX') )
93 else:
94     env.BlenderLib ( libname = 'bf_blenkernel', sources = sources, includes = Split(incs), defines = defs, libtype=['core','player'], priority = [166,25] )