Code Cleanup: whitespace
[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/raskter
45         ../../../intern/smoke/extern
46         ../../../extern/libmv
47         ../../../intern/atomic
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_evaluate.c
118         intern/mesh_mapping.c
119         intern/mesh_validate.c
120         intern/modifier.c
121         intern/modifiers_bmesh.c
122         intern/movieclip.c
123         intern/multires.c
124         intern/nla.c
125         intern/node.c
126         intern/object.c
127         intern/object_deform.c
128         intern/object_dupli.c
129         intern/ocean.c
130         intern/packedFile.c
131         intern/paint.c
132         intern/particle.c
133         intern/particle_system.c
134         intern/pbvh.c
135         intern/pbvh_bmesh.c
136         intern/pointcache.c
137         intern/property.c
138         intern/report.c
139         intern/rigidbody.c
140         intern/sca.c
141         intern/scene.c
142         intern/screen.c
143         intern/seqcache.c
144         intern/seqeffects.c
145         intern/seqmodifier.c
146         intern/sequencer.c
147         intern/shrinkwrap.c
148         intern/sketch.c
149         intern/smoke.c
150         intern/softbody.c
151         intern/sound.c
152         intern/speaker.c
153         intern/subsurf_ccg.c
154         intern/suggestions.c
155         intern/text.c
156         intern/texture.c
157         intern/tracking.c
158         intern/tracking_detect.c
159         intern/tracking_plane_tracker.c
160         intern/tracking_region_tracker.c
161         intern/tracking_solver.c
162         intern/tracking_stabilize.c
163         intern/tracking_util.c
164         intern/treehash.c
165         intern/unit.c
166         intern/world.c
167         intern/writeavi.c
168         intern/writeframeserver.c
169
170         BKE_DerivedMesh.h
171         BKE_action.h
172         BKE_addon.h
173         BKE_anim.h
174         BKE_animsys.h
175         BKE_armature.h
176         BKE_autoexec.h
177         BKE_blender.h
178         BKE_bmfont.h
179         BKE_bmfont_types.h
180         BKE_boids.h
181         BKE_bpath.h
182         BKE_brush.h
183         BKE_bullet.h
184         BKE_bvhutils.h
185         BKE_camera.h
186         BKE_ccg.h
187         BKE_cdderivedmesh.h
188         BKE_cloth.h
189         BKE_collision.h
190         BKE_colortools.h
191         BKE_constraint.h
192         BKE_context.h
193         BKE_curve.h
194         BKE_customdata.h
195         BKE_customdata_file.h
196         BKE_deform.h
197         BKE_depsgraph.h
198         BKE_displist.h
199         BKE_dynamicpaint.h
200         BKE_effect.h
201         BKE_fcurve.h
202         BKE_fluidsim.h
203         BKE_font.h
204         BKE_freestyle.h
205         BKE_global.h
206         BKE_gpencil.h
207         BKE_group.h
208         BKE_icons.h
209         BKE_idcode.h
210         BKE_idprop.h
211         BKE_image.h
212         BKE_ipo.h
213         BKE_key.h
214         BKE_lamp.h
215         BKE_lattice.h
216         BKE_library.h
217         BKE_linestyle.h
218         BKE_main.h
219         BKE_mask.h
220         BKE_material.h
221         BKE_mball.h
222         BKE_mesh.h
223         BKE_mesh_mapping.h
224         BKE_modifier.h
225         BKE_movieclip.h
226         BKE_multires.h
227         BKE_nla.h
228         BKE_node.h
229         BKE_object.h
230         BKE_object_deform.h
231         BKE_ocean.h
232         BKE_packedFile.h
233         BKE_paint.h
234         BKE_particle.h
235         BKE_pbvh.h
236         BKE_pointcache.h
237         BKE_property.h
238         BKE_report.h
239         BKE_rigidbody.h
240         BKE_sca.h
241         BKE_scene.h
242         BKE_screen.h
243         BKE_sequencer.h
244         BKE_shrinkwrap.h
245         BKE_sketch.h
246         BKE_smoke.h
247         BKE_softbody.h
248         BKE_sound.h
249         BKE_speaker.h
250         BKE_subsurf.h
251         BKE_suggestions.h
252         BKE_editmesh.h
253         BKE_editmesh_bvh.h
254         BKE_text.h
255         BKE_texture.h
256         BKE_tracking.h
257         BKE_treehash.h
258         BKE_unit.h
259         BKE_utildefines.h
260         BKE_world.h
261         BKE_writeavi.h
262         BKE_writeframeserver.h
263
264         depsgraph_private.h
265         nla_private.h
266         tracking_private.h
267         intern/CCGSubSurf.h
268         intern/pbvh_intern.h
269 )
270
271 add_definitions(-DGLEW_STATIC)
272
273 if(WITH_AUDASPACE)
274         list(APPEND INC
275                 ../../../intern/audaspace/intern
276         )
277         add_definitions(-DWITH_AUDASPACE)
278 endif()
279
280 if(WITH_BULLET)
281         list(APPEND INC_SYS
282                 ${BULLET_INCLUDE_DIRS}
283         )
284         list(APPEND INC
285                 ../../../intern/rigidbody
286         )
287         add_definitions(-DWITH_BULLET)
288 endif()
289
290 #if(WITH_MOD_CLOTH_ELTOPO)
291 #       list(APPEND INC
292 #               ../../../extern/eltopo
293 #               ../../../extern/eltopo/eltopo3d
294 #       )
295 #       add_definitions(-DWITH_ELTOPO)
296 #endif()
297
298 if(WITH_IMAGE_OPENEXR)
299         add_definitions(-DWITH_OPENEXR)
300 endif()
301
302 if(WITH_IMAGE_TIFF)
303         add_definitions(-DWITH_TIFF)
304 endif()
305
306 if(WITH_IMAGE_OPENJPEG)
307         add_definitions(-DWITH_OPENJPEG)
308 endif()
309
310 if(WITH_IMAGE_DDS)
311         add_definitions(-DWITH_DDS)
312 endif()
313
314 if(WITH_IMAGE_CINEON)
315         add_definitions(-DWITH_CINEON)
316 endif()
317
318 if(WITH_IMAGE_FRAMESERVER)
319         add_definitions(-DWITH_FRAMESERVER)
320 endif()
321
322 if(WITH_IMAGE_HDR)
323         add_definitions(-DWITH_HDR)
324 endif()
325
326 if(WITH_CODEC_AVI)
327         list(APPEND INC
328                 ../avi
329         )
330         add_definitions(-DWITH_AVI)
331 endif()
332
333 if(WITH_CODEC_QUICKTIME)
334         list(APPEND INC
335                 ../quicktime
336         )
337         list(APPEND INC_SYS
338                 ${QUICKTIME_INCLUDE_DIRS}
339         )
340         add_definitions(-DWITH_QUICKTIME)
341 endif()
342
343 if(WITH_CODEC_FFMPEG)
344         list(APPEND SRC
345                 intern/writeffmpeg.c
346                 BKE_writeffmpeg.h
347         )
348         list(APPEND INC
349                 ../../../intern/ffmpeg
350         )
351         list(APPEND INC_SYS
352                 ${FFMPEG_INCLUDE_DIRS}
353         )
354         add_definitions(-DWITH_FFMPEG)
355
356         remove_strict_flags_file(
357                 intern/writeffmpeg.c
358         )
359 endif()
360
361 if(WITH_PYTHON)
362         list(APPEND INC
363                 ../python
364         )
365         add_definitions(-DWITH_PYTHON)
366
367         if(WITH_PYTHON_SECURITY)
368                 add_definitions(-DWITH_PYTHON_SECURITY)
369         endif()
370 endif()
371
372 if(WITH_MOD_FLUID)
373         list(APPEND INC
374                 ../../../intern/elbeem/extern
375         )
376         add_definitions(-DWITH_MOD_FLUID)
377 endif()
378
379 if(WITH_MOD_SMOKE)
380         add_definitions(-DWITH_SMOKE)
381 endif()
382
383 if(WITH_MOD_OCEANSIM)
384         add_definitions(-DWITH_OCEANSIM)
385 endif()
386
387 if(WITH_MOD_BOOLEAN)
388         list(APPEND INC
389                 ../../../intern/bsp/extern
390         )
391 endif()
392
393 if(WITH_JACK)
394         add_definitions(-DWITH_JACK)
395 endif()
396
397 if(WITH_LZO)
398         list(APPEND INC_SYS
399                 ../../../extern/lzo/minilzo
400         )
401         add_definitions(-DWITH_LZO)
402 endif()
403
404 if(WITH_LZMA)
405         list(APPEND INC_SYS
406                 ../../../extern/lzma
407         )
408         add_definitions(-DWITH_LZMA)
409 endif()
410
411 if(WITH_GAMEENGINE)
412         list(APPEND INC_SYS
413                 ../../../extern/recastnavigation
414         )
415         list(APPEND SRC
416                 intern/navmesh_conversion.c
417                 BKE_navmesh_conversion.h
418         )
419
420         add_definitions(-DWITH_GAMEENGINE)
421 endif()
422
423 if(WITH_LIBMV)
424         add_definitions(-DWITH_LIBMV)
425 endif()
426
427 if(WITH_FFTW3)
428         list(APPEND INC_SYS
429                 ${FFTW3_INCLUDE_DIRS}
430         )
431         add_definitions(-DFFTW3=1)
432 endif()
433
434 if(WITH_INTERNATIONAL)
435         add_definitions(-DWITH_INTERNATIONAL)
436 endif()
437
438 if(WITH_FREESTYLE)
439         add_definitions(-DWITH_FREESTYLE)
440 endif()
441
442 ## Warnings as errors, this is too strict!
443 #if(MSVC)
444 #       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
445 #endif()
446
447 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")