svn merge -r41266:41287 ^/trunk/blender
[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         ../gpu
33         ../ikplugin
34         ../imbuf
35         ../makesdna
36         ../makesrna
37         ../bmesh
38         ../modifiers
39         ../nodes
40         ../render/extern/include
41         ../../../intern/bsp/extern
42         ../../../intern/decimation/extern
43         ../../../intern/elbeem/extern
44         ../../../intern/guardedalloc
45         ../../../intern/iksolver/extern
46         ../../../intern/memutil
47         ../../../intern/mikktspace
48         ../../../intern/opennl/extern
49         ../../../intern/smoke/extern
50
51         # XXX - BAD LEVEL CALL WM_api.h
52         ../windowmanager
53 )
54
55 set(INC_SYS
56         ${GLEW_INCLUDE_PATH}
57         ${ZLIB_INCLUDE_DIRS}
58 )
59
60 set(SRC
61         intern/BME_Customdata.c
62         intern/BME_conversions.c
63         intern/BME_eulers.c
64         intern/BME_mesh.c
65         intern/BME_structure.c
66         intern/BME_tools.c
67         intern/CCGSubSurf.c
68         intern/DerivedMesh.c
69         intern/action.c
70         intern/anim.c
71         intern/anim_sys.c
72         intern/armature.c
73         intern/blender.c
74         intern/bmfont.c
75         intern/boids.c
76         intern/booleanops_mesh.c
77         intern/brush.c
78         intern/bullet.c
79         intern/bvhutils.c
80         intern/cdderivedmesh.c
81         intern/cloth.c
82         intern/collision.c
83         intern/colortools.c
84         intern/constraint.c
85         intern/context.c
86         intern/curve.c
87         intern/customdata.c
88         intern/customdata_file.c
89         intern/deform.c
90         intern/depsgraph.c
91         intern/displist.c
92         intern/effect.c
93         intern/editderivedbmesh.c
94         intern/fcurve.c
95         intern/fluidsim.c
96         intern/fmodifier.c
97         intern/font.c
98         intern/gpencil.c
99         intern/group.c
100         intern/icons.c
101         intern/idcode.c
102         intern/idprop.c
103         intern/image.c
104         intern/image_gen.c
105         intern/implicit.c
106         intern/ipo.c
107         intern/key.c
108         intern/lattice.c
109         intern/library.c
110         intern/material.c
111         intern/mball.c
112         intern/mesh.c
113         intern/mesh_validate.c
114         intern/modifier.c
115         intern/modifiers_bmesh.c
116         intern/multires.c
117         intern/nla.c
118         intern/node.c
119         intern/object.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/unit.c
145         intern/world.c
146         intern/writeavi.c
147         intern/writeffmpeg.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_array_mallocn.h
156         BKE_blender.h
157         BKE_bmesh.h
158         BKE_bmeshCustomData.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_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_effect.h
179         BKE_fcurve.h
180         BKE_fluidsim.h
181         BKE_font.h
182         BKE_global.h
183         BKE_gpencil.h
184         BKE_group.h
185         BKE_icons.h
186         BKE_idcode.h
187         BKE_idprop.h
188         BKE_image.h
189         BKE_ipo.h
190         BKE_key.h
191         BKE_lattice.h
192         BKE_library.h
193         BKE_main.h
194         BKE_material.h
195         BKE_mball.h
196         BKE_mesh.h
197         BKE_modifier.h
198         BKE_multires.h
199         BKE_nla.h
200         BKE_node.h
201         BKE_object.h
202         BKE_packedFile.h
203         BKE_paint.h
204         BKE_particle.h
205         BKE_plugin_types.h
206         BKE_pointcache.h
207         BKE_property.h
208         BKE_report.h
209         BKE_sca.h
210         BKE_scene.h
211         BKE_screen.h
212         BKE_script.h
213         BKE_sequencer.h
214         BKE_shrinkwrap.h
215         BKE_sketch.h
216         BKE_smoke.h
217         BKE_softbody.h
218         BKE_sound.h
219         BKE_speaker.h
220         BKE_subsurf.h
221         BKE_suggestions.h
222         BKE_tessmesh.h
223         BKE_text.h
224         BKE_texture.h
225         BKE_unit.h
226         BKE_utildefines.h
227         BKE_world.h
228         BKE_writeavi.h
229         BKE_writeffmpeg.h
230         BKE_writeframeserver.h
231         depsgraph_private.h
232         intern/CCGSubSurf.h
233         intern/bmesh_private.h
234         nla_private.h
235 )
236
237 add_definitions(-DGLEW_STATIC)
238
239 if(WITH_AUDASPACE)
240         list(APPEND INC
241                 ../../../intern/audaspace/intern
242         )
243         add_definitions(-DWITH_AUDASPACE)
244 endif()
245
246 if(WITH_BULLET)
247         list(APPEND INC
248                 ../../../extern/bullet2/src
249         )
250         add_definitions(-DUSE_BULLET)
251 endif()
252
253 if(WITH_MOD_CLOTH_ELTOPO)
254         list(APPEND INC
255                 ../../../extern/eltopo
256         )
257         add_definitions(-DWITH_ELTOPO)
258 endif()
259
260 if(WITH_IMAGE_OPENEXR)
261         add_definitions(-DWITH_OPENEXR)
262 endif()
263
264 if(WITH_IMAGE_TIFF)
265         add_definitions(-DWITH_TIFF)
266 endif()
267
268 if(WITH_IMAGE_OPENJPEG)
269         add_definitions(-DWITH_OPENJPEG)
270 endif()
271
272 if(WITH_IMAGE_DDS)
273         add_definitions(-DWITH_DDS)
274 endif()
275
276 if(WITH_IMAGE_CINEON)
277         add_definitions(-DWITH_CINEON)
278 endif()
279
280 if(WITH_IMAGE_FRAMESERVER)
281         add_definitions(-DWITH_FRAMESERVER)
282 endif()
283
284 if(WITH_IMAGE_HDR)
285         add_definitions(-DWITH_HDR)
286 endif()
287
288 if(WITH_CODEC_QUICKTIME)
289         list(APPEND INC
290                 ../quicktime
291         )
292         list(APPEND INC_SYS
293                 ${QUICKTIME_INCLUDE_DIRS}
294         )
295         add_definitions(-DWITH_QUICKTIME)
296 endif()
297
298 if(WITH_CODEC_FFMPEG)
299         list(APPEND INC
300                 ../../../intern/ffmpeg
301         )
302         list(APPEND INC_SYS
303                 ${FFMPEG_INCLUDE_DIRS}
304         )
305         add_definitions(-DWITH_FFMPEG)
306
307         remove_strict_flags_file(
308                 intern/writeffmpeg.c
309         )
310 endif()
311
312 if(WITH_PYTHON)
313         list(APPEND INC
314                 ../python
315         )
316         list(APPEND INC_SYS
317                 ${PYTHON_INCLUDE_DIRS}
318         )
319         add_definitions(-DWITH_PYTHON)
320
321         if(WITH_PYTHON_SECURITY)
322                 add_definitions(-DWITH_PYTHON_SECURITY)
323         endif()
324 endif()
325
326 if(WITH_OPENMP)
327         add_definitions(-DPARALLEL=1)
328 endif()
329
330 if(NOT WITH_MOD_FLUID)
331         add_definitions(-DDISABLE_ELBEEM)
332 endif()
333
334 if(WITH_MOD_SMOKE)
335         add_definitions(-DWITH_SMOKE)
336 endif()
337
338 if(WITH_JACK)
339         add_definitions(-DWITH_JACK)
340 endif()
341
342 if(WITH_LZO)
343         list(APPEND INC_SYS
344                 ../../../extern/lzo/minilzo
345         )
346         add_definitions(-DWITH_LZO)
347 endif()
348
349 if(WITH_LZMA)
350         list(APPEND INC_SYS
351                 ../../../extern/lzma
352         )
353         add_definitions(-DWITH_LZMA)
354 endif()
355
356 if(WITH_GAMEENGINE)
357         list(APPEND INC_SYS
358                 ../../../extern/recastnavigation
359         )
360         list(APPEND SRC
361                 intern/navmesh_conversion.c
362                 BKE_navmesh_conversion.h
363         )
364
365         add_definitions(-DWITH_GAMEENGINE)
366 endif()
367
368 ## Warnings as errors, this is too strict!
369 #if(MSVC)
370 #       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
371 #endif()
372
373 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")