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