Massive Code cleanup:
[blender-staging.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
47         # XXX - BAD LEVEL CALL WM_api.h
48         ../windowmanager
49 )
50
51 set(INC_SYS
52         ${GLEW_INCLUDE_PATH}
53         ${ZLIB_INCLUDE_DIRS}
54 )
55
56 set(SRC
57         intern/CCGSubSurf.c
58         intern/DerivedMesh.c
59         intern/action.c
60         intern/anim.c
61         intern/anim_sys.c
62         intern/armature.c
63         intern/blender.c
64         intern/bmfont.c
65         intern/boids.c
66         intern/booleanops_mesh.c
67         intern/brush.c
68         intern/bullet.c
69         intern/bvhutils.c
70         intern/camera.c
71         intern/cdderivedmesh.c
72         intern/cloth.c
73         intern/collision.c
74         intern/colortools.c
75         intern/constraint.c
76         intern/context.c
77         intern/curve.c
78         intern/customdata.c
79         intern/customdata_file.c
80         intern/deform.c
81         intern/depsgraph.c
82         intern/displist.c
83         intern/dynamicpaint.c
84         intern/editderivedmesh.c
85         intern/effect.c
86         intern/fcurve.c
87         intern/fluidsim.c
88         intern/fmodifier.c
89         intern/font.c
90         intern/gpencil.c
91         intern/group.c
92         intern/icons.c
93         intern/idcode.c
94         intern/idprop.c
95         intern/image.c
96         intern/image_gen.c
97         intern/implicit.c
98         intern/ipo.c
99         intern/key.c
100         intern/lamp.c
101         intern/lattice.c
102         intern/library.c
103         intern/material.c
104         intern/mball.c
105         intern/mesh.c
106         intern/mesh_validate.c
107         intern/modifier.c
108         intern/modifiers_bmesh.c
109         intern/movieclip.c
110         intern/multires.c
111         intern/nla.c
112         intern/node.c
113         intern/object.c
114         intern/ocean.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/speaker.c
135         intern/subsurf_ccg.c
136         intern/suggestions.c
137         intern/text.c
138         intern/texture.c
139         intern/tracking.c
140         intern/unit.c
141         intern/world.c
142         intern/writeavi.c
143         intern/writeframeserver.c
144         
145         BKE_DerivedMesh.h
146         BKE_action.h
147         BKE_anim.h
148         BKE_animsys.h
149         BKE_armature.h
150         BKE_blender.h
151         BKE_bmesh.h
152         BKE_bmfont.h
153         BKE_bmfont_types.h
154         BKE_boids.h
155         BKE_booleanops_mesh.h
156         BKE_brush.h
157         BKE_bullet.h
158         BKE_bvhutils.h
159         BKE_camera.h
160         BKE_ccg.h
161         BKE_cdderivedmesh.h
162         BKE_cloth.h
163         BKE_collision.h
164         BKE_colortools.h
165         BKE_constraint.h
166         BKE_context.h
167         BKE_curve.h
168         BKE_customdata.h
169         BKE_customdata_file.h
170         BKE_deform.h
171         BKE_depsgraph.h
172         BKE_displist.h
173         BKE_dynamicpaint.h
174         BKE_effect.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_lamp.h
188         BKE_lattice.h
189         BKE_library.h
190         BKE_main.h
191         BKE_material.h
192         BKE_mball.h
193         BKE_mesh.h
194         BKE_modifier.h
195         BKE_movieclip.h
196         BKE_multires.h
197         BKE_nla.h
198         BKE_node.h
199         BKE_object.h
200         BKE_ocean.h
201         BKE_packedFile.h
202         BKE_paint.h
203         BKE_particle.h
204         BKE_pointcache.h
205         BKE_property.h
206         BKE_report.h
207         BKE_sca.h
208         BKE_scene.h
209         BKE_screen.h
210         BKE_script.h
211         BKE_sequencer.h
212         BKE_shrinkwrap.h
213         BKE_sketch.h
214         BKE_smoke.h
215         BKE_softbody.h
216         BKE_sound.h
217         BKE_speaker.h
218         BKE_subsurf.h
219         BKE_suggestions.h
220         BKE_tessmesh.h
221         BKE_text.h
222         BKE_texture.h
223         BKE_tracking.h
224         BKE_unit.h
225         BKE_utildefines.h
226         BKE_world.h
227         BKE_writeavi.h
228         BKE_writeframeserver.h
229         depsgraph_private.h
230         nla_private.h
231         intern/CCGSubSurf.h
232 )
233
234 add_definitions(-DGLEW_STATIC)
235
236 if(WITH_AUDASPACE)
237         list(APPEND INC
238                 ../../../intern/audaspace/intern
239         )
240         add_definitions(-DWITH_AUDASPACE)
241 endif()
242
243 if(WITH_BULLET)
244         list(APPEND INC
245                 ../../../extern/bullet2/src
246         )
247         add_definitions(-DUSE_BULLET)
248 endif()
249
250 if(WITH_MOD_CLOTH_ELTOPO)
251         list(APPEND INC
252                 ../../../extern/eltopo
253         )
254         add_definitions(-DWITH_ELTOPO)
255 endif()
256
257 if(WITH_IMAGE_OPENEXR)
258         add_definitions(-DWITH_OPENEXR)
259 endif()
260
261 if(WITH_IMAGE_TIFF)
262         add_definitions(-DWITH_TIFF)
263 endif()
264
265 if(WITH_IMAGE_OPENJPEG)
266         add_definitions(-DWITH_OPENJPEG)
267 endif()
268
269 if(WITH_IMAGE_DDS)
270         add_definitions(-DWITH_DDS)
271 endif()
272
273 if(WITH_IMAGE_CINEON)
274         add_definitions(-DWITH_CINEON)
275 endif()
276
277 if(WITH_IMAGE_FRAMESERVER)
278         add_definitions(-DWITH_FRAMESERVER)
279 endif()
280
281 if(WITH_IMAGE_HDR)
282         add_definitions(-DWITH_HDR)
283 endif()
284
285 if(WITH_CODEC_QUICKTIME)
286         list(APPEND INC
287                 ../quicktime
288         )
289         list(APPEND INC_SYS
290                 ${QUICKTIME_INCLUDE_DIRS}
291         )
292         add_definitions(-DWITH_QUICKTIME)
293 endif()
294
295 if(WITH_CODEC_FFMPEG)
296         list(APPEND SRC
297                 intern/writeffmpeg.c
298                 BKE_writeffmpeg.h
299         )
300         list(APPEND INC
301                 ../../../intern/ffmpeg
302         )
303         list(APPEND INC_SYS
304                 ${FFMPEG_INCLUDE_DIRS}
305         )
306         add_definitions(-DWITH_FFMPEG)
307
308         remove_strict_flags_file(
309                 intern/writeffmpeg.c
310         )
311 endif()
312
313 if(WITH_PYTHON)
314         list(APPEND INC
315                 ../python
316         )
317         list(APPEND INC_SYS
318                 ${PYTHON_INCLUDE_DIRS}
319         )
320         add_definitions(-DWITH_PYTHON)
321
322         if(WITH_PYTHON_SECURITY)
323                 add_definitions(-DWITH_PYTHON_SECURITY)
324         endif()
325 endif()
326
327 if(WITH_OPENMP)
328         add_definitions(-DPARALLEL=1)
329 endif()
330
331 if(WITH_MOD_FLUID)
332         list(APPEND INC
333                 ../../../intern/elbeem/extern
334         )
335         add_definitions(-DWITH_MOD_FLUID)
336 endif()
337
338 if(WITH_MOD_SMOKE)
339         list(APPEND INC
340                 ../../../intern/smoke/extern
341         )
342         add_definitions(-DWITH_SMOKE)
343 endif()
344
345 if(WITH_MOD_OCEANSIM)
346         add_definitions(-DWITH_OCEANSIM)
347 endif()
348
349 if(WITH_MOD_DECIMATE)
350         list(APPEND INC
351                 ../../../intern/decimation/extern
352         )
353 endif()
354
355 if(WITH_MOD_BOOLEAN)
356         list(APPEND INC
357                 ../../../intern/bsp/extern
358         )
359 endif()
360
361 if(WITH_JACK)
362         add_definitions(-DWITH_JACK)
363 endif()
364
365 if(WITH_LZO)
366         list(APPEND INC_SYS
367                 ../../../extern/lzo/minilzo
368         )
369         add_definitions(-DWITH_LZO)
370 endif()
371
372 if(WITH_LZMA)
373         list(APPEND INC_SYS
374                 ../../../extern/lzma
375         )
376         add_definitions(-DWITH_LZMA)
377 endif()
378
379 if(WITH_GAMEENGINE)
380         list(APPEND INC_SYS
381                 ../../../extern/recastnavigation
382         )
383         list(APPEND SRC
384                 intern/navmesh_conversion.c
385                 BKE_navmesh_conversion.h
386         )
387
388         add_definitions(-DWITH_GAMEENGINE)
389 endif()
390
391 if(WITH_LIBMV)
392         list(APPEND INC
393                 ../../../extern/libmv
394         )
395         add_definitions(-DWITH_LIBMV)
396 endif()
397
398 if(WITH_FFTW3)
399         list(APPEND INC_SYS
400                 ${FFTW3_INCLUDE_DIRS}
401         )
402         add_definitions(-DFFTW3=1)
403 endif()
404
405 if(WITH_INTERNATIONAL)
406         add_definitions(-DWITH_INTERNATIONAL)
407 endif()
408
409 ## Warnings as errors, this is too strict!
410 #if(MSVC)
411 #       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
412 #endif()
413
414 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")