Merging r46725 through r46963 from trunk into soc-2011-tomato
[blender.git] / source / blender / blenkernel / CMakeLists.txt
1 # ***** BEGIN GPL LICENSE BLOCK *****
2 #
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #
17 # The Original Code is Copyright (C) 2006, Blender Foundation
18 # All rights reserved.
19 #
20 # The Original Code is: all of this file.
21 #
22 # Contributor(s): Jacques Beaurain.
23 #
24 # ***** END GPL LICENSE BLOCK *****
25
26 set(INC
27         .
28         ../avi
29         ../blenfont
30         ../blenlib
31         ../blenloader
32         ../gpu
33         ../ikplugin
34         ../imbuf
35         ../makesdna
36         ../makesrna
37         ../bmesh
38         ../modifiers
39         ../nodes
40         ../render/extern/include
41         ../../../intern/guardedalloc
42         ../../../intern/iksolver/extern
43         ../../../intern/memutil
44         ../../../intern/mikktspace
45         ../../../intern/opennl/extern
46         ../../../intern/raskter
47
48         # XXX - BAD LEVEL CALL WM_api.h
49         ../windowmanager
50 )
51
52 set(INC_SYS
53         ${GLEW_INCLUDE_PATH}
54         ${ZLIB_INCLUDE_DIRS}
55 )
56
57 set(SRC
58         intern/CCGSubSurf.c
59         intern/DerivedMesh.c
60         intern/action.c
61         intern/anim.c
62         intern/anim_sys.c
63         intern/armature.c
64         intern/blender.c
65         intern/bmfont.c
66         intern/boids.c
67         intern/booleanops_mesh.c
68         intern/brush.c
69         intern/bullet.c
70         intern/bvhutils.c
71         intern/camera.c
72         intern/cdderivedmesh.c
73         intern/cloth.c
74         intern/collision.c
75         intern/colortools.c
76         intern/constraint.c
77         intern/context.c
78         intern/curve.c
79         intern/customdata.c
80         intern/customdata_file.c
81         intern/deform.c
82         intern/depsgraph.c
83         intern/displist.c
84         intern/dynamicpaint.c
85         intern/editderivedmesh.c
86         intern/effect.c
87         intern/fcurve.c
88         intern/fluidsim.c
89         intern/fmodifier.c
90         intern/font.c
91         intern/gpencil.c
92         intern/group.c
93         intern/icons.c
94         intern/idcode.c
95         intern/idprop.c
96         intern/image.c
97         intern/image_gen.c
98         intern/implicit.c
99         intern/ipo.c
100         intern/key.c
101         intern/lamp.c
102         intern/lattice.c
103         intern/library.c
104         intern/mask.c
105         intern/material.c
106         intern/mball.c
107         intern/mesh.c
108         intern/mesh_validate.c
109         intern/modifier.c
110         intern/modifiers_bmesh.c
111         intern/movieclip.c
112         intern/multires.c
113         intern/nla.c
114         intern/node.c
115         intern/object.c
116         intern/ocean.c
117         intern/packedFile.c
118         intern/paint.c
119         intern/particle.c
120         intern/particle_system.c
121         intern/pointcache.c
122         intern/property.c
123         intern/report.c
124         intern/sca.c
125         intern/scene.c
126         intern/screen.c
127         intern/script.c
128         intern/seqcache.c
129         intern/seqeffects.c
130         intern/sequencer.c
131         intern/shrinkwrap.c
132         intern/sketch.c
133         intern/smoke.c
134         intern/softbody.c
135         intern/sound.c
136         intern/speaker.c
137         intern/subsurf_ccg.c
138         intern/suggestions.c
139         intern/text.c
140         intern/texture.c
141         intern/tracking.c
142         intern/unit.c
143         intern/world.c
144         intern/writeavi.c
145         intern/writeframeserver.c
146         
147         BKE_DerivedMesh.h
148         BKE_action.h
149         BKE_anim.h
150         BKE_animsys.h
151         BKE_armature.h
152         BKE_blender.h
153         BKE_bmesh.h
154         BKE_bmfont.h
155         BKE_bmfont_types.h
156         BKE_boids.h
157         BKE_booleanops_mesh.h
158         BKE_brush.h
159         BKE_bullet.h
160         BKE_bvhutils.h
161         BKE_camera.h
162         BKE_ccg.h
163         BKE_cdderivedmesh.h
164         BKE_cloth.h
165         BKE_collision.h
166         BKE_colortools.h
167         BKE_constraint.h
168         BKE_context.h
169         BKE_curve.h
170         BKE_customdata.h
171         BKE_customdata_file.h
172         BKE_deform.h
173         BKE_depsgraph.h
174         BKE_displist.h
175         BKE_dynamicpaint.h
176         BKE_effect.h
177         BKE_fcurve.h
178         BKE_fluidsim.h
179         BKE_font.h
180         BKE_global.h
181         BKE_gpencil.h
182         BKE_group.h
183         BKE_icons.h
184         BKE_idcode.h
185         BKE_idprop.h
186         BKE_image.h
187         BKE_ipo.h
188         BKE_key.h
189         BKE_lamp.h
190         BKE_lattice.h
191         BKE_library.h
192         BKE_mask.h
193         BKE_main.h
194         BKE_material.h
195         BKE_mball.h
196         BKE_mesh.h
197         BKE_modifier.h
198         BKE_movieclip.h
199         BKE_multires.h
200         BKE_nla.h
201         BKE_node.h
202         BKE_object.h
203         BKE_ocean.h
204         BKE_packedFile.h
205         BKE_paint.h
206         BKE_particle.h
207         BKE_plugin_types.h
208         BKE_pointcache.h
209         BKE_property.h
210         BKE_report.h
211         BKE_sca.h
212         BKE_scene.h
213         BKE_screen.h
214         BKE_script.h
215         BKE_sequencer.h
216         BKE_shrinkwrap.h
217         BKE_sketch.h
218         BKE_smoke.h
219         BKE_softbody.h
220         BKE_sound.h
221         BKE_speaker.h
222         BKE_subsurf.h
223         BKE_suggestions.h
224         BKE_tessmesh.h
225         BKE_text.h
226         BKE_texture.h
227         BKE_tracking.h
228         BKE_unit.h
229         BKE_utildefines.h
230         BKE_world.h
231         BKE_writeavi.h
232         BKE_writeframeserver.h
233         depsgraph_private.h
234         nla_private.h
235         intern/CCGSubSurf.h
236 )
237
238 add_definitions(-DGLEW_STATIC)
239
240 if(WITH_AUDASPACE)
241         list(APPEND INC
242                 ../../../intern/audaspace/intern
243         )
244         add_definitions(-DWITH_AUDASPACE)
245 endif()
246
247 if(WITH_BULLET)
248         list(APPEND INC
249                 ../../../extern/bullet2/src
250         )
251         add_definitions(-DUSE_BULLET)
252 endif()
253
254 if(WITH_MOD_CLOTH_ELTOPO)
255         list(APPEND INC
256                 ../../../extern/eltopo
257         )
258         add_definitions(-DWITH_ELTOPO)
259 endif()
260
261 if(WITH_IMAGE_OPENEXR)
262         add_definitions(-DWITH_OPENEXR)
263 endif()
264
265 if(WITH_IMAGE_TIFF)
266         add_definitions(-DWITH_TIFF)
267 endif()
268
269 if(WITH_IMAGE_OPENJPEG)
270         add_definitions(-DWITH_OPENJPEG)
271 endif()
272
273 if(WITH_IMAGE_DDS)
274         add_definitions(-DWITH_DDS)
275 endif()
276
277 if(WITH_IMAGE_CINEON)
278         add_definitions(-DWITH_CINEON)
279 endif()
280
281 if(WITH_IMAGE_FRAMESERVER)
282         add_definitions(-DWITH_FRAMESERVER)
283 endif()
284
285 if(WITH_IMAGE_HDR)
286         add_definitions(-DWITH_HDR)
287 endif()
288
289 if(WITH_CODEC_QUICKTIME)
290         list(APPEND INC
291                 ../quicktime
292         )
293         list(APPEND INC_SYS
294                 ${QUICKTIME_INCLUDE_DIRS}
295         )
296         add_definitions(-DWITH_QUICKTIME)
297 endif()
298
299 if(WITH_CODEC_FFMPEG)
300         list(APPEND SRC
301                 intern/writeffmpeg.c
302                 BKE_writeffmpeg.h
303         )
304         list(APPEND INC
305                 ../../../intern/ffmpeg
306         )
307         list(APPEND INC_SYS
308                 ${FFMPEG_INCLUDE_DIRS}
309         )
310         add_definitions(-DWITH_FFMPEG)
311
312         remove_strict_flags_file(
313                 intern/writeffmpeg.c
314         )
315 endif()
316
317 if(WITH_PYTHON)
318         list(APPEND INC
319                 ../python
320         )
321         list(APPEND INC_SYS
322                 ${PYTHON_INCLUDE_DIRS}
323         )
324         add_definitions(-DWITH_PYTHON)
325
326         if(WITH_PYTHON_SECURITY)
327                 add_definitions(-DWITH_PYTHON_SECURITY)
328         endif()
329 endif()
330
331 if(WITH_OPENMP)
332         add_definitions(-DPARALLEL=1)
333 endif()
334
335 if(WITH_MOD_FLUID)
336         list(APPEND INC
337                 ../../../intern/elbeem/extern
338         )
339         add_definitions(-DWITH_MOD_FLUID)
340 endif()
341
342 if(WITH_MOD_SMOKE)
343         list(APPEND INC
344                 ../../../intern/smoke/extern
345         )
346         add_definitions(-DWITH_SMOKE)
347 endif()
348
349 if(WITH_MOD_OCEANSIM)
350         add_definitions(-DWITH_OCEANSIM)
351 endif()
352
353 if(WITH_MOD_DECIMATE)
354         list(APPEND INC
355                 ../../../intern/decimation/extern
356         )
357 endif()
358
359 if(WITH_MOD_BOOLEAN)
360         list(APPEND INC
361                 ../../../intern/bsp/extern
362         )
363 endif()
364
365 if(WITH_JACK)
366         add_definitions(-DWITH_JACK)
367 endif()
368
369 if(WITH_LZO)
370         list(APPEND INC_SYS
371                 ../../../extern/lzo/minilzo
372         )
373         add_definitions(-DWITH_LZO)
374 endif()
375
376 if(WITH_LZMA)
377         list(APPEND INC_SYS
378                 ../../../extern/lzma
379         )
380         add_definitions(-DWITH_LZMA)
381 endif()
382
383 if(WITH_GAMEENGINE)
384         list(APPEND INC_SYS
385                 ../../../extern/recastnavigation
386         )
387         list(APPEND SRC
388                 intern/navmesh_conversion.c
389                 BKE_navmesh_conversion.h
390         )
391
392         add_definitions(-DWITH_GAMEENGINE)
393 endif()
394
395 if(WITH_LIBMV)
396         list(APPEND INC
397                 ../../../extern/libmv
398         )
399         add_definitions(-DWITH_LIBMV)
400 endif()
401
402 if(WITH_FFTW3)
403         list(APPEND INC_SYS
404                 ${FFTW3_INCLUDE_DIRS}
405         )
406         add_definitions(-DFFTW3=1)
407 endif()
408
409 if(WITH_INTERNATIONAL)
410         add_definitions(-DWITH_INTERNATIONAL)
411 endif()
412
413 ## Warnings as errors, this is too strict!
414 #if(MSVC)
415 #       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
416 #endif()
417
418 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")