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