add option WITH_BUILTIN_GLEW, so linux packagers can disable to use their own glew...
[blender.git] / source / blender / blenkernel / CMakeLists.txt
1 # $Id$
2 # ***** BEGIN GPL LICENSE BLOCK *****
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 #
18 # The Original Code is Copyright (C) 2006, Blender Foundation
19 # All rights reserved.
20 #
21 # The Original Code is: all of this file.
22 #
23 # Contributor(s): Jacques Beaurain.
24 #
25 # ***** END GPL LICENSE BLOCK *****
26
27 set(INC 
28         .
29         ../avi
30         ../blenlib
31         ../blenloader
32         ../gpu
33         ../ikplugin
34         ../imbuf
35         ../makesdna
36         ../makesrna
37         ../modifiers
38         ../nodes
39         ../editors/include
40         ../render/extern/include
41         ../../../intern/audaspace/intern
42         ../../../intern/bsp/extern ../blenfont
43         ../../../intern/decimation/extern
44         ../../../intern/elbeem/extern
45         ../../../intern/guardedalloc
46         ../../../intern/iksolver/extern
47         ../../../intern/memutil
48         ../../../intern/opennl/extern
49         ../../../intern/smoke/extern
50         ../../../intern/mikktspace
51     ../../../source/blender/windowmanager # XXX - BAD LEVEL CALL WM_api.h
52         ${GLEW_INCLUDE_PATH}
53         ${ZLIB_INCLUDE_DIRS}
54 )
55
56 set(SRC
57         intern/BME_Customdata.c
58         intern/BME_conversions.c
59         intern/BME_eulers.c
60         intern/BME_mesh.c
61         intern/BME_structure.c
62         intern/BME_tools.c
63         intern/CCGSubSurf.c
64         intern/DerivedMesh.c
65         intern/action.c
66         intern/anim.c
67         intern/anim_sys.c
68         intern/armature.c
69         intern/blender.c
70         intern/bmfont.c
71         intern/boids.c
72         intern/booleanops_mesh.c
73         intern/brush.c
74         intern/bullet.c
75         intern/bvhutils.c
76         intern/cdderivedmesh.c
77         intern/cloth.c
78         intern/collision.c
79         intern/colortools.c
80         intern/constraint.c
81         intern/context.c
82         intern/curve.c
83         intern/customdata.c
84         intern/customdata_file.c
85         intern/deform.c
86         intern/depsgraph.c
87         intern/displist.c
88         intern/effect.c
89         intern/exotic.c
90         intern/fcurve.c
91         intern/fluidsim.c
92         intern/fmodifier.c
93         intern/font.c
94         intern/gpencil.c
95         intern/group.c
96         intern/icons.c
97         intern/idcode.c
98         intern/idprop.c
99         intern/image.c
100         intern/image_gen.c
101         intern/implicit.c
102         intern/ipo.c
103         intern/key.c
104         intern/lattice.c
105         intern/library.c
106         intern/material.c
107         intern/mball.c
108         intern/mesh.c
109         intern/mesh_validate.c
110         intern/modifier.c
111         intern/multires.c
112         intern/nla.c
113         intern/node.c
114         intern/object.c
115         intern/packedFile.c
116         intern/paint.c
117         intern/particle.c
118         intern/particle_system.c
119         intern/pointcache.c
120         intern/property.c
121         intern/report.c
122         intern/sca.c
123         intern/scene.c
124         intern/screen.c
125         intern/script.c
126         intern/seqcache.c
127         intern/seqeffects.c
128         intern/sequencer.c
129         intern/shrinkwrap.c
130         intern/sketch.c
131         intern/smoke.c
132         intern/softbody.c
133         intern/sound.c
134         intern/subsurf_ccg.c
135         intern/suggestions.c
136         intern/text.c
137         intern/texture.c
138         intern/unit.c
139         intern/world.c
140         intern/writeavi.c
141         intern/writeffmpeg.c
142         intern/writeframeserver.c
143
144         BKE_DerivedMesh.h
145         BKE_action.h
146         BKE_anim.h
147         BKE_animsys.h
148         BKE_armature.h
149         BKE_array_mallocn.h
150         BKE_blender.h
151         BKE_bmesh.h
152         BKE_bmeshCustomData.h
153         BKE_bmfont.h
154         BKE_bmfont_types.h
155         BKE_boids.h
156         BKE_booleanops_mesh.h
157         BKE_brush.h
158         BKE_bullet.h
159         BKE_bvhutils.h
160         BKE_cdderivedmesh.h
161         BKE_cloth.h
162         BKE_collision.h
163         BKE_colortools.h
164         BKE_constraint.h
165         BKE_context.h
166         BKE_curve.h
167         BKE_customdata.h
168         BKE_customdata_file.h
169         BKE_deform.h
170         BKE_depsgraph.h
171         BKE_displist.h
172         BKE_effect.h
173         BKE_endian.h
174         BKE_exotic.h
175         BKE_fcurve.h
176         BKE_fluidsim.h
177         BKE_font.h
178         BKE_global.h
179         BKE_gpencil.h
180         BKE_group.h
181         BKE_icons.h
182         BKE_idcode.h
183         BKE_idprop.h
184         BKE_image.h
185         BKE_ipo.h
186         BKE_key.h
187         BKE_lattice.h
188         BKE_library.h
189         BKE_main.h
190         BKE_material.h
191         BKE_mball.h
192         BKE_mesh.h
193         BKE_modifier.h
194         BKE_multires.h
195         BKE_nla.h
196         BKE_node.h
197         BKE_object.h
198         BKE_packedFile.h
199         BKE_paint.h
200         BKE_particle.h
201         BKE_plugin_types.h
202         BKE_pointcache.h
203         BKE_property.h
204         BKE_report.h
205         BKE_sca.h
206         BKE_scene.h
207         BKE_screen.h
208         BKE_script.h
209         BKE_sequencer.h
210         BKE_shrinkwrap.h
211         BKE_sketch.h
212         BKE_smoke.h
213         BKE_softbody.h
214         BKE_sound.h
215         BKE_subsurf.h
216         BKE_suggestions.h
217         BKE_text.h
218         BKE_texture.h
219         BKE_unit.h
220         BKE_utildefines.h
221         BKE_world.h
222         BKE_writeavi.h
223         BKE_writeffmpeg.h
224         BKE_writeframeserver.h
225         depsgraph_private.h
226         intern/CCGSubSurf.h
227         intern/bmesh_private.h
228         nla_private.h
229 )
230
231 add_definitions(-DGLEW_STATIC)
232
233 if(WITH_BULLET)
234         list(APPEND INC ../../../extern/bullet2/src)
235         add_definitions(-DUSE_BULLET)
236 endif()
237
238 if(WITH_IMAGE_OPENEXR)
239         add_definitions(-DWITH_OPENEXR)
240 endif()
241
242 if(WITH_IMAGE_TIFF)
243         add_definitions(-DWITH_TIFF)
244 endif()
245
246 if(WITH_IMAGE_OPENJPEG)
247         add_definitions(-DWITH_OPENJPEG)
248 endif()
249
250 if(WITH_IMAGE_DDS)
251         add_definitions(-DWITH_DDS)
252 endif()
253
254 if(WITH_IMAGE_CINEON)
255         add_definitions(-DWITH_CINEON)
256 endif()
257
258 if(WITH_IMAGE_HDR)
259         add_definitions(-DWITH_HDR)
260 endif()
261
262 if(WITH_CODEC_QUICKTIME)
263         list(APPEND INC ../quicktime ${QUICKTIME_INC})
264         add_definitions(-DWITH_QUICKTIME)
265 endif()
266
267 if(WITH_CODEC_FFMPEG)
268         list(APPEND INC ${FFMPEG_INC})
269         add_definitions(-DWITH_FFMPEG)
270 endif()
271
272 if(WITH_LCMS)
273         list(APPEND INC ${LCMS_INCLUDE_DIR})
274         add_definitions(-DWITH_LCMS)
275 endif()
276
277 if(WITH_PYTHON)
278         list(APPEND INC ../python ${PYTHON_INCLUDE_DIRS})
279         add_definitions(-DWITH_PYTHON)
280 endif()
281
282 if(WITH_OPENMP)
283         add_definitions(-DPARALLEL=1)
284 endif()
285
286 if(NOT WITH_MOD_FLUID)
287         add_definitions(-DDISABLE_ELBEEM)
288 endif()
289
290 if(WITH_JACK)
291         add_definitions(-DWITH_JACK)
292 endif()
293
294 if(WITH_LZO)
295         list(APPEND INC ../../../extern/lzo/minilzo)
296         add_definitions(-DWITH_LZO)
297 endif()
298
299 if(WITH_LZMA)
300         list(APPEND INC ../../../extern/lzma)
301         add_definitions(-DWITH_LZMA)
302 endif()
303
304 if(MSVC)
305     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
306 endif()
307
308 blender_add_lib(bf_blenkernel "${SRC}" "${INC}")