Merging r58475 through r58700 from trunk into soc-2013-depsgraph_mt
[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         ../blenfont
29         ../blenlib
30         ../blenloader
31         ../gpu
32         ../ikplugin
33         ../imbuf
34         ../makesdna
35         ../makesrna
36         ../bmesh
37         ../modifiers
38         ../nodes
39         ../render/extern/include
40         ../../../intern/guardedalloc
41         ../../../intern/iksolver/extern
42         ../../../intern/memutil
43         ../../../intern/mikktspace
44         ../../../intern/opennl/extern
45         ../../../intern/raskter
46         ../../../intern/smoke/extern
47         ../../../extern/libmv
48
49         # XXX - BAD LEVEL CALL WM_api.h
50         ../windowmanager
51 )
52
53 set(INC_SYS
54         ${GLEW_INCLUDE_PATH}
55         ${ZLIB_INCLUDE_DIRS}
56 )
57
58 set(SRC
59         intern/CCGSubSurf.c
60         intern/DerivedMesh.c
61         intern/action.c
62         intern/addon.c
63         intern/anim.c
64         intern/anim_sys.c
65         intern/armature.c
66         intern/autoexec.c
67         intern/blender.c
68         intern/bmfont.c
69         intern/boids.c
70         intern/bpath.c
71         intern/brush.c
72         intern/bullet.c
73         intern/bvhutils.c
74         intern/camera.c
75         intern/cdderivedmesh.c
76         intern/cloth.c
77         intern/collision.c
78         intern/colortools.c
79         intern/constraint.c
80         intern/context.c
81         intern/curve.c
82         intern/customdata.c
83         intern/customdata_file.c
84         intern/deform.c
85         intern/depsgraph.c
86         intern/displist.c
87         intern/dynamicpaint.c
88         intern/editderivedmesh.c
89         intern/editmesh.c
90         intern/editmesh_bvh.c
91         intern/effect.c
92         intern/fcurve.c
93         intern/fluidsim.c
94         intern/fmodifier.c
95         intern/font.c
96         intern/freestyle.c
97         intern/gpencil.c
98         intern/group.c
99         intern/icons.c
100         intern/idcode.c
101         intern/idprop.c
102         intern/image.c
103         intern/image_gen.c
104         intern/implicit.c
105         intern/ipo.c
106         intern/key.c
107         intern/lamp.c
108         intern/lattice.c
109         intern/library.c
110         intern/linestyle.c
111         intern/mask.c
112         intern/mask_evaluate.c
113         intern/mask_rasterize.c
114         intern/material.c
115         intern/mball.c
116         intern/mesh.c
117         intern/mesh_validate.c
118         intern/modifier.c
119         intern/modifiers_bmesh.c
120         intern/movieclip.c
121         intern/multires.c
122         intern/nla.c
123         intern/node.c
124         intern/object.c
125         intern/object_deform.c
126         intern/ocean.c
127         intern/packedFile.c
128         intern/paint.c
129         intern/particle.c
130         intern/particle_system.c
131         intern/pbvh.c
132         intern/pbvh_bmesh.c
133         intern/pointcache.c
134         intern/property.c
135         intern/report.c
136         intern/rigidbody.c
137         intern/sca.c
138         intern/scene.c
139         intern/screen.c
140         intern/seqcache.c
141         intern/seqeffects.c
142         intern/seqmodifier.c
143         intern/sequencer.c
144         intern/shrinkwrap.c
145         intern/sketch.c
146         intern/smoke.c
147         intern/softbody.c
148         intern/sound.c
149         intern/speaker.c
150         intern/subsurf_ccg.c
151         intern/suggestions.c
152         intern/text.c
153         intern/texture.c
154         intern/tracking.c
155         intern/unit.c
156         intern/world.c
157         intern/writeavi.c
158         intern/writeframeserver.c
159
160         BKE_DerivedMesh.h
161         BKE_action.h
162         BKE_addon.h
163         BKE_anim.h
164         BKE_animsys.h
165         BKE_armature.h
166         BKE_autoexec.h
167         BKE_blender.h
168         BKE_bmfont.h
169         BKE_bmfont_types.h
170         BKE_boids.h
171         BKE_bpath.h
172         BKE_brush.h
173         BKE_bullet.h
174         BKE_bvhutils.h
175         BKE_camera.h
176         BKE_ccg.h
177         BKE_cdderivedmesh.h
178         BKE_cloth.h
179         BKE_collision.h
180         BKE_colortools.h
181         BKE_constraint.h
182         BKE_context.h
183         BKE_curve.h
184         BKE_customdata.h
185         BKE_customdata_file.h
186         BKE_deform.h
187         BKE_depsgraph.h
188         BKE_displist.h
189         BKE_dynamicpaint.h
190         BKE_effect.h
191         BKE_fcurve.h
192         BKE_fluidsim.h
193         BKE_font.h
194         BKE_freestyle.h
195         BKE_global.h
196         BKE_gpencil.h
197         BKE_group.h
198         BKE_icons.h
199         BKE_idcode.h
200         BKE_idprop.h
201         BKE_image.h
202         BKE_ipo.h
203         BKE_key.h
204         BKE_lamp.h
205         BKE_lattice.h
206         BKE_library.h
207         BKE_linestyle.h
208         BKE_main.h
209         BKE_mask.h
210         BKE_material.h
211         BKE_mball.h
212         BKE_mesh.h
213         BKE_modifier.h
214         BKE_movieclip.h
215         BKE_multires.h
216         BKE_nla.h
217         BKE_node.h
218         BKE_object.h
219         BKE_object_deform.h
220         BKE_ocean.h
221         BKE_packedFile.h
222         BKE_paint.h
223         BKE_particle.h
224         BKE_pbvh.h
225         BKE_pointcache.h
226         BKE_property.h
227         BKE_report.h
228         BKE_rigidbody.h
229         BKE_sca.h
230         BKE_scene.h
231         BKE_screen.h
232         BKE_sequencer.h
233         BKE_shrinkwrap.h
234         BKE_sketch.h
235         BKE_smoke.h
236         BKE_softbody.h
237         BKE_sound.h
238         BKE_speaker.h
239         BKE_subsurf.h
240         BKE_suggestions.h
241         BKE_editmesh.h
242         BKE_editmesh_bvh.h
243         BKE_text.h
244         BKE_texture.h
245         BKE_tracking.h
246         BKE_unit.h
247         BKE_utildefines.h
248         BKE_world.h
249         BKE_writeavi.h
250         BKE_writeframeserver.h
251
252         depsgraph_private.h
253         nla_private.h
254         intern/CCGSubSurf.h
255         intern/pbvh_intern.h
256 )
257
258 add_definitions(-DGLEW_STATIC)
259
260 if(WITH_AUDASPACE)
261         list(APPEND INC
262                 ../../../intern/audaspace/intern
263         )
264         add_definitions(-DWITH_AUDASPACE)
265 endif()
266
267 if(WITH_BULLET)
268         list(APPEND INC_SYS
269                 ${BULLET_INCLUDE_DIRS}
270         )
271         list(APPEND INC
272                 ../../../intern/rigidbody
273         )
274         add_definitions(-DWITH_BULLET)
275 endif()
276
277 #if(WITH_MOD_CLOTH_ELTOPO)
278 #       list(APPEND INC
279 #               ../../../extern/eltopo
280 #               ../../../extern/eltopo/eltopo3d
281 #       )
282 #       add_definitions(-DWITH_ELTOPO)
283 #endif()
284
285 if(WITH_IMAGE_OPENEXR)
286         add_definitions(-DWITH_OPENEXR)
287 endif()
288
289 if(WITH_IMAGE_TIFF)
290         add_definitions(-DWITH_TIFF)
291 endif()
292
293 if(WITH_IMAGE_OPENJPEG)
294         add_definitions(-DWITH_OPENJPEG)
295 endif()
296
297 if(WITH_IMAGE_DDS)
298         add_definitions(-DWITH_DDS)
299 endif()
300
301 if(WITH_IMAGE_CINEON)
302         add_definitions(-DWITH_CINEON)
303 endif()
304
305 if(WITH_IMAGE_FRAMESERVER)
306         add_definitions(-DWITH_FRAMESERVER)
307 endif()
308
309 if(WITH_IMAGE_HDR)
310         add_definitions(-DWITH_HDR)
311 endif()
312
313 if(WITH_CODEC_AVI)
314         list(APPEND INC
315                 ../avi
316         )
317         add_definitions(-DWITH_AVI)
318 endif()
319
320 if(WITH_CODEC_QUICKTIME)
321         list(APPEND INC
322                 ../quicktime
323         )
324         list(APPEND INC_SYS
325                 ${QUICKTIME_INCLUDE_DIRS}
326         )
327         add_definitions(-DWITH_QUICKTIME)
328 endif()
329
330 if(WITH_CODEC_FFMPEG)
331         list(APPEND SRC
332                 intern/writeffmpeg.c
333                 BKE_writeffmpeg.h
334         )
335         list(APPEND INC
336                 ../../../intern/ffmpeg
337         )
338         list(APPEND INC_SYS
339                 ${FFMPEG_INCLUDE_DIRS}
340         )
341         add_definitions(-DWITH_FFMPEG)
342
343         remove_strict_flags_file(
344                 intern/writeffmpeg.c
345         )
346 endif()
347
348 if(WITH_PYTHON)
349         list(APPEND INC
350                 ../python
351         )
352         add_definitions(-DWITH_PYTHON)
353
354         if(WITH_PYTHON_SECURITY)
355                 add_definitions(-DWITH_PYTHON_SECURITY)
356         endif()
357 endif()
358
359 if(WITH_MOD_FLUID)
360         list(APPEND INC
361                 ../../../intern/elbeem/extern
362         )
363         add_definitions(-DWITH_MOD_FLUID)
364 endif()
365
366 if(WITH_MOD_SMOKE)
367         add_definitions(-DWITH_SMOKE)
368 endif()
369
370 if(WITH_MOD_OCEANSIM)
371         add_definitions(-DWITH_OCEANSIM)
372 endif()
373
374 if(WITH_MOD_BOOLEAN)
375         list(APPEND INC
376                 ../../../intern/bsp/extern
377         )
378 endif()
379
380 if(WITH_JACK)
381         add_definitions(-DWITH_JACK)
382 endif()
383
384 if(WITH_LZO)
385         list(APPEND INC_SYS
386                 ../../../extern/lzo/minilzo
387         )
388         add_definitions(-DWITH_LZO)
389 endif()
390
391 if(WITH_LZMA)
392         list(APPEND INC_SYS
393                 ../../../extern/lzma
394         )
395         add_definitions(-DWITH_LZMA)
396 endif()
397
398 if(WITH_GAMEENGINE)
399         list(APPEND INC_SYS
400                 ../../../extern/recastnavigation
401         )
402         list(APPEND SRC
403                 intern/navmesh_conversion.c
404                 BKE_navmesh_conversion.h
405         )
406
407         add_definitions(-DWITH_GAMEENGINE)
408 endif()
409
410 if(WITH_LIBMV)
411         add_definitions(-DWITH_LIBMV)
412 endif()
413
414 if(WITH_FFTW3)
415         list(APPEND INC_SYS
416                 ${FFTW3_INCLUDE_DIRS}
417         )
418         add_definitions(-DFFTW3=1)
419 endif()
420
421 if(WITH_INTERNATIONAL)
422         add_definitions(-DWITH_INTERNATIONAL)
423 endif()
424
425 if(WITH_FREESTYLE)
426         add_definitions(-DWITH_FREESTYLE)
427 endif()
428
429 ## Warnings as errors, this is too strict!
430 #if(MSVC)
431 #       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
432 #endif()
433
434 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")