Include SDL information in system info text.
[blender.git] / source / blender / python / SConscript
1 #!/usr/bin/env python
2 #
3 # ***** BEGIN GPL LICENSE BLOCK *****
4 #
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 #
19 # The Original Code is Copyright (C) 2006, Blender Foundation
20 # All rights reserved.
21 #
22 # The Original Code is: all of this file.
23 #
24 # Contributor(s): Nathan Letwory.
25 #
26 # ***** END GPL LICENSE BLOCK *****
27
28 # TODO, split into 3 files.
29
30 Import ('env')
31
32 incs = [
33     '.',
34     '#/intern/guardedalloc',
35     '#/intern/memutil',
36     env['BF_GLEW_INC'],
37     '#/intern/glew-mx',
38     '#/intern/audaspace/intern',
39     '#/intern/cycles/blender',
40     '../blenfont',
41     '../blenkernel',
42     '../blenlib',
43     '../blenloader',
44     '../bmesh',
45     '../editors/include',
46     '../gpu',
47     '../imbuf',
48     '../makesdna',
49     '../makesrna',
50     '../nodes',
51     '../render/extern/include',
52     '../windowmanager',
53     env['BF_PYTHON_INC'],
54     ]
55 incs = ' '.join(incs)
56
57 is_debug = (env['OURPLATFORM'] in ('win32-mingw', 'win32-vc','win64-vc', 'win64-mingw') and env['BF_DEBUG'])
58
59 # bmesh
60 defs = []
61
62 sources = env.Glob('bmesh/*.c')
63 env.BlenderLib( libname = 'bf_python_bmesh', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core','player'], priority = [362,165])
64
65 # generic
66 defs = env['BF_GL_DEFINITIONS']
67
68 if is_debug:
69     defs.append('_DEBUG')
70
71 sources = env.Glob('generic/*.c')
72 env.BlenderLib( libname = 'bf_python_ext', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core','player'], priority = [363,165]) # ketsji is 360
73
74
75 # mathutils
76 defs = []
77
78 sources = env.Glob('mathutils/*.c')
79 env.BlenderLib( libname = 'bf_python_mathutils', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core','player'], priority = [362,165])
80
81
82 # bpy
83 defs = env['BF_GL_DEFINITIONS']
84
85 if is_debug:
86     defs.append('_DEBUG')
87
88 if env['WITH_BF_PYTHON_SAFETY']:
89     defs.append('WITH_PYTHON_SAFETY')
90
91 if env['BF_BUILDINFO']:
92     defs.append('BUILD_DATE')
93
94
95 # Audaspace is always on currently
96
97 if env['WITH_BF_BULLET']:
98     defs.append('WITH_BULLET')
99
100 # AVI is always on currently
101
102 if env['WITH_BF_FFMPEG']:
103     defs.append('WITH_FFMPEG')
104     incs += ' ' + env['BF_FFMPEG_INC']
105
106 if env['WITH_BF_QUICKTIME']:
107     defs.append('WITH_QUICKTIME')
108
109 if env['WITH_BF_SNDFILE']:
110     defs.append('WITH_SNDFILE')
111
112 if env['WITH_BF_COMPOSITOR']:
113     defs.append('WITH_COMPOSITOR')
114
115 if env['WITH_BF_CYCLES']:
116     defs.append('WITH_CYCLES')
117
118 if env['WITH_BF_CYCLES_OSL']:
119     defs.append('WITH_CYCLES_OSL')
120
121 if env['WITH_BF_FREESTYLE']:
122     incs += ' ../freestyle/intern/python'
123     defs.append('WITH_FREESTYLE')
124
125 if env['WITH_BF_GAMEENGINE']:
126     defs.append('WITH_GAMEENGINE')
127
128 if env['WITH_BF_CINEON']:
129     defs.append('WITH_CINEON')
130
131 if env['WITH_BF_DDS']:
132     defs.append('WITH_DDS')
133
134 if env['WITH_BF_FRAMESERVER']:
135     defs.append('WITH_FRAMESERVER')
136
137 if env['WITH_BF_HDR']:
138     defs.append('WITH_HDR')
139
140 if env['WITH_BF_OPENEXR']:
141     defs.append('WITH_OPENEXR')
142
143 if env['WITH_BF_OPENJPEG']:
144     defs.append('WITH_OPENJPEG')
145
146 if env['WITH_BF_REDCODE']:
147     defs.append('WITH_REDCODE')
148
149 if env['WITH_BF_TIFF']:
150     defs.append('WITH_TIFF')
151
152 # NDof is always on currently
153
154 if env['WITH_BF_INTERNATIONAL']:
155     defs.append('WITH_INTERNATIONAL')
156
157 if env['WITH_BF_OPENAL']:
158     defs.append('WITH_OPENAL')
159
160 if env['WITH_BF_SDL']:
161     defs.append('WITH_SDL')
162     incs += ' ' + env['BF_SDL_INC']
163
164     if env['WITH_BF_SDL_DYNLOAD']:
165         defs.append('WITH_SDL_DYNLOAD')
166         incs += ' #extern/sdlew/include'
167
168 if env['WITH_BF_JACK']:
169     defs.append('WITH_JACK')
170
171 if env['WITH_BF_LIBMV']:
172     defs.append('WITH_LIBMV')
173
174 if env['WITH_BF_BOOLEAN']:
175     defs.append('WITH_MOD_BOOLEAN')
176
177 if env['WITH_BF_FLUID']:
178     defs.append('WITH_MOD_FLUID')
179
180 if env['WITH_BF_OCEANSIM']:
181     defs.append('WITH_OCEANSIM')
182
183 if env['WITH_BF_REMESH']:
184     defs.append('WITH_MOD_REMESH')
185
186 if env['WITH_BF_SMOKE']:
187     defs.append('WITH_SMOKE')
188
189 if env['WITH_BF_COLLADA']:
190     defs.append('WITH_COLLADA')
191
192 if env['WITH_BF_OCIO']:
193     defs.append('WITH_OCIO')
194     incs += ' ' + '#/intern/opencolorio'
195
196 if env['WITH_BF_OIIO']:
197     defs.append('WITH_OPENIMAGEIO')
198     incs += ' ../imbuf/intern/oiio'
199
200 if env['WITH_BF_PLAYER']:
201     defs.append('WITH_PLAYER')
202     
203
204 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-mingw', 'linuxcross', 'win64-vc'):
205     incs += ' ' + env['BF_PTHREADS_INC']
206
207 sources = env.Glob('intern/*.c')
208 env.BlenderLib( libname = 'bf_python', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core'], priority = [361])