svn merge ^/trunk/blender -r43443:43461
[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         ../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/camera.c
81         intern/cdderivedmesh.c
82         intern/cloth.c
83         intern/collision.c
84         intern/colortools.c
85         intern/constraint.c
86         intern/context.c
87         intern/curve.c
88         intern/customdata.c
89         intern/customdata_file.c
90         intern/deform.c
91         intern/depsgraph.c
92         intern/displist.c
93         intern/dynamicpaint.c
94         intern/effect.c
95         intern/editderivedmesh.c
96         intern/fcurve.c
97         intern/fluidsim.c
98         intern/fmodifier.c
99         intern/font.c
100         intern/gpencil.c
101         intern/group.c
102         intern/icons.c
103         intern/idcode.c
104         intern/idprop.c
105         intern/image.c
106         intern/image_gen.c
107         intern/implicit.c
108         intern/ipo.c
109         intern/key.c
110         intern/lamp.c
111         intern/lattice.c
112         intern/library.c
113         intern/material.c
114         intern/mball.c
115         intern/mesh.c
116         intern/mesh_validate.c
117         intern/modifier.c
118         intern/modifiers_bmesh.c
119         intern/movieclip.c
120         intern/multires.c
121         intern/nla.c
122         intern/node.c
123         intern/ocean.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/tracking.c
150         intern/unit.c
151         intern/world.c
152         intern/writeavi.c
153         intern/writeffmpeg.c
154         intern/writeframeserver.c
155         
156         BKE_DerivedMesh.h
157         BKE_action.h
158         BKE_anim.h
159         BKE_animsys.h
160         BKE_armature.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_camera.h
172         BKE_cdderivedmesh.h
173         BKE_cloth.h
174         BKE_collision.h
175         BKE_colortools.h
176         BKE_constraint.h
177         BKE_context.h
178         BKE_curve.h
179         BKE_customdata.h
180         BKE_customdata_file.h
181         BKE_deform.h
182         BKE_depsgraph.h
183         BKE_displist.h
184         BKE_dynamicpaint.h
185         BKE_effect.h
186         BKE_fcurve.h
187         BKE_fluidsim.h
188         BKE_font.h
189         BKE_global.h
190         BKE_gpencil.h
191         BKE_group.h
192         BKE_icons.h
193         BKE_idcode.h
194         BKE_idprop.h
195         BKE_image.h
196         BKE_ipo.h
197         BKE_key.h
198         BKE_lamp.h
199         BKE_lattice.h
200         BKE_library.h
201         BKE_main.h
202         BKE_material.h
203         BKE_mball.h
204         BKE_mesh.h
205         BKE_modifier.h
206         BKE_movieclip.h
207         BKE_multires.h
208         BKE_nla.h
209         BKE_node.h
210         BKE_ocean.h
211         BKE_object.h
212         BKE_packedFile.h
213         BKE_paint.h
214         BKE_particle.h
215         BKE_plugin_types.h
216         BKE_pointcache.h
217         BKE_property.h
218         BKE_report.h
219         BKE_sca.h
220         BKE_scene.h
221         BKE_screen.h
222         BKE_script.h
223         BKE_sequencer.h
224         BKE_shrinkwrap.h
225         BKE_sketch.h
226         BKE_smoke.h
227         BKE_softbody.h
228         BKE_sound.h
229         BKE_speaker.h
230         BKE_subsurf.h
231         BKE_suggestions.h
232         BKE_tessmesh.h
233         BKE_text.h
234         BKE_texture.h
235         BKE_tracking.h
236         BKE_unit.h
237         BKE_utildefines.h
238         BKE_world.h
239         BKE_writeavi.h
240         BKE_writeffmpeg.h
241         BKE_writeframeserver.h
242         depsgraph_private.h
243         intern/CCGSubSurf.h
244         intern/bmesh_private.h
245         nla_private.h
246 )
247
248 add_definitions(-DGLEW_STATIC)
249
250 if(WITH_AUDASPACE)
251         list(APPEND INC
252                 ../../../intern/audaspace/intern
253         )
254         add_definitions(-DWITH_AUDASPACE)
255 endif()
256
257 if(WITH_BULLET)
258         list(APPEND INC
259                 ../../../extern/bullet2/src
260         )
261         add_definitions(-DUSE_BULLET)
262 endif()
263
264 if(WITH_MOD_CLOTH_ELTOPO)
265         list(APPEND INC
266                 ../../../extern/eltopo
267         )
268         add_definitions(-DWITH_ELTOPO)
269 endif()
270
271 if(WITH_IMAGE_OPENEXR)
272         add_definitions(-DWITH_OPENEXR)
273 endif()
274
275 if(WITH_IMAGE_TIFF)
276         add_definitions(-DWITH_TIFF)
277 endif()
278
279 if(WITH_IMAGE_OPENJPEG)
280         add_definitions(-DWITH_OPENJPEG)
281 endif()
282
283 if(WITH_IMAGE_DDS)
284         add_definitions(-DWITH_DDS)
285 endif()
286
287 if(WITH_IMAGE_CINEON)
288         add_definitions(-DWITH_CINEON)
289 endif()
290
291 if(WITH_IMAGE_FRAMESERVER)
292         add_definitions(-DWITH_FRAMESERVER)
293 endif()
294
295 if(WITH_IMAGE_HDR)
296         add_definitions(-DWITH_HDR)
297 endif()
298
299 if(WITH_CODEC_QUICKTIME)
300         list(APPEND INC
301                 ../quicktime
302         )
303         list(APPEND INC_SYS
304                 ${QUICKTIME_INCLUDE_DIRS}
305         )
306         add_definitions(-DWITH_QUICKTIME)
307 endif()
308
309 if(WITH_CODEC_FFMPEG)
310         list(APPEND INC
311                 ../../../intern/ffmpeg
312         )
313         list(APPEND INC_SYS
314                 ${FFMPEG_INCLUDE_DIRS}
315         )
316         add_definitions(-DWITH_FFMPEG)
317
318         remove_strict_flags_file(
319                 intern/writeffmpeg.c
320         )
321 endif()
322
323 if(WITH_PYTHON)
324         list(APPEND INC
325                 ../python
326         )
327         list(APPEND INC_SYS
328                 ${PYTHON_INCLUDE_DIRS}
329         )
330         add_definitions(-DWITH_PYTHON)
331
332         if(WITH_PYTHON_SECURITY)
333                 add_definitions(-DWITH_PYTHON_SECURITY)
334         endif()
335 endif()
336
337 if(WITH_OPENMP)
338         add_definitions(-DPARALLEL=1)
339 endif()
340
341 if(WITH_MOD_FLUID)
342         add_definitions(-DWITH_MOD_FLUID)
343 endif()
344
345 if(WITH_MOD_SMOKE)
346         add_definitions(-DWITH_SMOKE)
347 endif()
348
349 if(WITH_MOD_OCEANSIM)
350         add_definitions(-DWITH_OCEANSIM)
351 endif()
352
353 if(WITH_JACK)
354         add_definitions(-DWITH_JACK)
355 endif()
356
357 if(WITH_LZO)
358         list(APPEND INC_SYS
359                 ../../../extern/lzo/minilzo
360         )
361         add_definitions(-DWITH_LZO)
362 endif()
363
364 if(WITH_LZMA)
365         list(APPEND INC_SYS
366                 ../../../extern/lzma
367         )
368         add_definitions(-DWITH_LZMA)
369 endif()
370
371 if(WITH_GAMEENGINE)
372         list(APPEND INC_SYS
373                 ../../../extern/recastnavigation
374         )
375         list(APPEND SRC
376                 intern/navmesh_conversion.c
377                 BKE_navmesh_conversion.h
378         )
379
380         add_definitions(-DWITH_GAMEENGINE)
381 endif()
382
383 if(WITH_LIBMV)
384         list(APPEND INC
385                 ../../../extern/libmv
386         )
387         add_definitions(-DWITH_LIBMV)
388 endif()
389
390 if(WITH_FFTW3)
391         list(APPEND INC_SYS
392                 ${FFTW3_INCLUDE_DIRS}
393         )
394         add_definitions(-DFFTW3=1)
395 endif()
396
397 ## Warnings as errors, this is too strict!
398 #if(MSVC)
399 #       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
400 #endif()
401
402 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")