Merged changes in the trunk up to revision 48893.
[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         ../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         )
261         add_definitions(-DWITH_ELTOPO)
262 endif()
263
264 if(WITH_IMAGE_OPENEXR)
265         add_definitions(-DWITH_OPENEXR)
266 endif()
267
268 if(WITH_IMAGE_TIFF)
269         add_definitions(-DWITH_TIFF)
270 endif()
271
272 if(WITH_IMAGE_OPENJPEG)
273         add_definitions(-DWITH_OPENJPEG)
274 endif()
275
276 if(WITH_IMAGE_DDS)
277         add_definitions(-DWITH_DDS)
278 endif()
279
280 if(WITH_IMAGE_CINEON)
281         add_definitions(-DWITH_CINEON)
282 endif()
283
284 if(WITH_IMAGE_FRAMESERVER)
285         add_definitions(-DWITH_FRAMESERVER)
286 endif()
287
288 if(WITH_IMAGE_HDR)
289         add_definitions(-DWITH_HDR)
290 endif()
291
292 if(WITH_CODEC_QUICKTIME)
293         list(APPEND INC
294                 ../quicktime
295         )
296         list(APPEND INC_SYS
297                 ${QUICKTIME_INCLUDE_DIRS}
298         )
299         add_definitions(-DWITH_QUICKTIME)
300 endif()
301
302 if(WITH_CODEC_FFMPEG)
303         list(APPEND SRC
304                 intern/writeffmpeg.c
305                 BKE_writeffmpeg.h
306         )
307         list(APPEND INC
308                 ../../../intern/ffmpeg
309         )
310         list(APPEND INC_SYS
311                 ${FFMPEG_INCLUDE_DIRS}
312         )
313         add_definitions(-DWITH_FFMPEG)
314
315         remove_strict_flags_file(
316                 intern/writeffmpeg.c
317         )
318 endif()
319
320 if(WITH_PYTHON)
321         list(APPEND INC
322                 ../python
323         )
324         add_definitions(-DWITH_PYTHON)
325
326         if(WITH_PYTHON_SECURITY)
327                 add_definitions(-DWITH_PYTHON_SECURITY)
328         endif()
329 endif()
330
331 if(WITH_OPENMP)
332         add_definitions(-DPARALLEL=1)
333 endif()
334
335 if(WITH_MOD_FLUID)
336         list(APPEND INC
337                 ../../../intern/elbeem/extern
338         )
339         add_definitions(-DWITH_MOD_FLUID)
340 endif()
341
342 if(WITH_MOD_SMOKE)
343         list(APPEND INC
344                 ../../../intern/smoke/extern
345         )
346         add_definitions(-DWITH_SMOKE)
347 endif()
348
349 if(WITH_MOD_OCEANSIM)
350         add_definitions(-DWITH_OCEANSIM)
351 endif()
352
353 if(WITH_MOD_DECIMATE)
354         list(APPEND INC
355                 ../../../intern/decimation/extern
356         )
357 endif()
358
359 if(WITH_MOD_BOOLEAN)
360         list(APPEND INC
361                 ../../../intern/bsp/extern
362         )
363 endif()
364
365 if(WITH_JACK)
366         add_definitions(-DWITH_JACK)
367 endif()
368
369 if(WITH_LZO)
370         list(APPEND INC_SYS
371                 ../../../extern/lzo/minilzo
372         )
373         add_definitions(-DWITH_LZO)
374 endif()
375
376 if(WITH_LZMA)
377         list(APPEND INC_SYS
378                 ../../../extern/lzma
379         )
380         add_definitions(-DWITH_LZMA)
381 endif()
382
383 if(WITH_GAMEENGINE)
384         list(APPEND INC_SYS
385                 ../../../extern/recastnavigation
386         )
387         list(APPEND SRC
388                 intern/navmesh_conversion.c
389                 BKE_navmesh_conversion.h
390         )
391
392         add_definitions(-DWITH_GAMEENGINE)
393 endif()
394
395 if(WITH_LIBMV)
396         list(APPEND INC
397                 ../../../extern/libmv
398         )
399         add_definitions(-DWITH_LIBMV)
400 endif()
401
402 if(WITH_FFTW3)
403         list(APPEND INC_SYS
404                 ${FFTW3_INCLUDE_DIRS}
405         )
406         add_definitions(-DFFTW3=1)
407 endif()
408
409 if(WITH_INTERNATIONAL)
410         add_definitions(-DWITH_INTERNATIONAL)
411 endif()
412
413 ## Warnings as errors, this is too strict!
414 #if(MSVC)
415 #       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
416 #endif()
417
418 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")