svn merge ^/trunk/blender -r41226:41227 .
[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 if(WITH_CODEC_FFMPEG)
27         # FFMPEG gives warnigns which are hard to avoid across multiple versions.
28         remove_strict_flags()
29 endif()
30
31 set(INC 
32         .
33         ../avi
34         ../blenfont
35         ../blenlib
36         ../blenloader
37         ../gpu
38         ../ikplugin
39         ../imbuf
40         ../makesdna
41         ../makesrna
42         ../bmesh
43         ../modifiers
44         ../nodes
45         ../render/extern/include
46         ../../../intern/bsp/extern
47         ../../../intern/decimation/extern
48         ../../../intern/elbeem/extern
49         ../../../intern/guardedalloc
50         ../../../intern/iksolver/extern
51         ../../../intern/memutil
52         ../../../intern/mikktspace
53         ../../../intern/opennl/extern
54         ../../../intern/smoke/extern
55
56         # XXX - BAD LEVEL CALL WM_api.h
57         ../windowmanager
58 )
59
60 set(INC_SYS
61         ${GLEW_INCLUDE_PATH}
62         ${ZLIB_INCLUDE_DIRS}
63 )
64
65 set(SRC
66         intern/BME_Customdata.c
67         intern/BME_conversions.c
68         intern/BME_eulers.c
69         intern/BME_mesh.c
70         intern/BME_structure.c
71         intern/BME_tools.c
72         intern/CCGSubSurf.c
73         intern/DerivedMesh.c
74         intern/action.c
75         intern/anim.c
76         intern/anim_sys.c
77         intern/armature.c
78         intern/blender.c
79         intern/bmfont.c
80         intern/boids.c
81         intern/booleanops_mesh.c
82         intern/brush.c
83         intern/bullet.c
84         intern/bvhutils.c
85         intern/cdderivedmesh.c
86         intern/cloth.c
87         intern/collision.c
88         intern/colortools.c
89         intern/constraint.c
90         intern/context.c
91         intern/curve.c
92         intern/customdata.c
93         intern/customdata_file.c
94         intern/deform.c
95         intern/depsgraph.c
96         intern/displist.c
97         intern/effect.c
98         intern/editderivedbmesh.c
99         intern/fcurve.c
100         intern/fluidsim.c
101         intern/fmodifier.c
102         intern/font.c
103         intern/gpencil.c
104         intern/group.c
105         intern/icons.c
106         intern/idcode.c
107         intern/idprop.c
108         intern/image.c
109         intern/image_gen.c
110         intern/implicit.c
111         intern/ipo.c
112         intern/key.c
113         intern/lattice.c
114         intern/library.c
115         intern/material.c
116         intern/mball.c
117         intern/mesh.c
118         intern/mesh_validate.c
119         intern/modifier.c
120         intern/modifiers_bmesh.c
121         intern/multires.c
122         intern/nla.c
123         intern/node.c
124         intern/object.c
125         intern/packedFile.c
126         intern/paint.c
127         intern/particle.c
128         intern/particle_system.c
129         intern/pointcache.c
130         intern/property.c
131         intern/report.c
132         intern/sca.c
133         intern/scene.c
134         intern/screen.c
135         intern/script.c
136         intern/seqcache.c
137         intern/seqeffects.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/unit.c
150         intern/world.c
151         intern/writeavi.c
152         intern/writeffmpeg.c
153         intern/writeframeserver.c
154         
155         BKE_DerivedMesh.h
156         BKE_action.h
157         BKE_anim.h
158         BKE_animsys.h
159         BKE_armature.h
160         BKE_array_mallocn.h
161         BKE_blender.h
162         BKE_bmesh.h
163         BKE_bmeshCustomData.h
164         BKE_bmfont.h
165         BKE_bmfont_types.h
166         BKE_boids.h
167         BKE_booleanops_mesh.h
168         BKE_brush.h
169         BKE_bullet.h
170         BKE_bvhutils.h
171         BKE_cdderivedmesh.h
172         BKE_cloth.h
173         BKE_collision.h
174         BKE_colortools.h
175         BKE_constraint.h
176         BKE_context.h
177         BKE_curve.h
178         BKE_customdata.h
179         BKE_customdata_file.h
180         BKE_deform.h
181         BKE_depsgraph.h
182         BKE_displist.h
183         BKE_effect.h
184         BKE_fcurve.h
185         BKE_fluidsim.h
186         BKE_font.h
187         BKE_global.h
188         BKE_gpencil.h
189         BKE_group.h
190         BKE_icons.h
191         BKE_idcode.h
192         BKE_idprop.h
193         BKE_image.h
194         BKE_ipo.h
195         BKE_key.h
196         BKE_lattice.h
197         BKE_library.h
198         BKE_main.h
199         BKE_material.h
200         BKE_mball.h
201         BKE_mesh.h
202         BKE_modifier.h
203         BKE_multires.h
204         BKE_nla.h
205         BKE_node.h
206         BKE_object.h
207         BKE_packedFile.h
208         BKE_paint.h
209         BKE_particle.h
210         BKE_plugin_types.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_unit.h
231         BKE_utildefines.h
232         BKE_world.h
233         BKE_writeavi.h
234         BKE_writeffmpeg.h
235         BKE_writeframeserver.h
236         depsgraph_private.h
237         intern/CCGSubSurf.h
238         intern/bmesh_private.h
239         nla_private.h
240 )
241
242 add_definitions(-DGLEW_STATIC)
243
244 if(WITH_AUDASPACE)
245         list(APPEND INC
246                 ../../../intern/audaspace/intern
247         )
248         add_definitions(-DWITH_AUDASPACE)
249 endif()
250
251 if(WITH_BULLET)
252         list(APPEND INC
253                 ../../../extern/bullet2/src
254         )
255         add_definitions(-DUSE_BULLET)
256 endif()
257
258 if(WITH_MOD_CLOTH_ELTOPO)
259         list(APPEND INC
260                 ../../../extern/eltopo
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 INC
305                 ../../../intern/ffmpeg
306         )
307         list(APPEND INC_SYS
308                 ${FFMPEG_INCLUDE_DIRS}
309         )
310         add_definitions(-DWITH_FFMPEG)
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(NOT WITH_MOD_FLUID)
332         add_definitions(-DDISABLE_ELBEEM)
333 endif()
334
335 if(WITH_MOD_SMOKE)
336         add_definitions(-DWITH_SMOKE)
337 endif()
338
339 if(WITH_JACK)
340         add_definitions(-DWITH_JACK)
341 endif()
342
343 if(WITH_LZO)
344         list(APPEND INC_SYS
345                 ../../../extern/lzo/minilzo
346         )
347         add_definitions(-DWITH_LZO)
348 endif()
349
350 if(WITH_LZMA)
351         list(APPEND INC_SYS
352                 ../../../extern/lzma
353         )
354         add_definitions(-DWITH_LZMA)
355 endif()
356
357 if(WITH_GAMEENGINE)
358         list(APPEND INC_SYS
359                 ../../../extern/recastnavigation
360         )
361         list(APPEND SRC
362                 intern/navmesh_conversion.c
363                 BKE_navmesh_conversion.h
364         )
365
366         add_definitions(-DWITH_GAMEENGINE)
367 endif()
368
369 ## Warnings as errors, this is too strict!
370 #if(MSVC)
371 #       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
372 #endif()
373
374 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")