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