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