e549a205325b7b829402ced20edbde500d2a05d4
[blender.git] / source / blender / blenkernel / CMakeLists.txt
1 # $Id$
2 # ***** BEGIN GPL LICENSE BLOCK *****
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 #
18 # The Original Code is Copyright (C) 2006, Blender Foundation
19 # All rights reserved.
20 #
21 # The Original Code is: all of this file.
22 #
23 # Contributor(s): Jacques Beaurain.
24 #
25 # ***** END GPL LICENSE BLOCK *****
26
27 if(WITH_CODEC_FFMPEG)
28         # FFMPEG gives warnigns which are hard to avoid across multiple versions.
29         remove_strict_flags()
30 endif()
31
32 set(INC 
33         .
34         ../avi
35         ../blenfont
36         ../blenlib
37         ../blenloader
38         ../editors/include
39         ../gpu
40         ../ikplugin
41         ../imbuf
42         ../makesdna
43         ../makesrna
44         ../modifiers
45         ../nodes
46         ../render/extern/include
47         ../../../intern/bsp/extern
48         ../../../intern/decimation/extern
49         ../../../intern/elbeem/extern
50         ../../../intern/guardedalloc
51         ../../../intern/iksolver/extern
52         ../../../intern/memutil
53         ../../../intern/mikktspace
54         ../../../intern/opennl/extern
55         ../../../intern/smoke/extern
56
57         # XXX - BAD LEVEL CALL WM_api.h
58         ../windowmanager
59 )
60
61 set(INC_SYS
62         ${GLEW_INCLUDE_PATH}
63         ${ZLIB_INCLUDE_DIRS}
64 )
65
66 set(SRC
67         intern/BME_Customdata.c
68         intern/BME_conversions.c
69         intern/BME_eulers.c
70         intern/BME_mesh.c
71         intern/BME_structure.c
72         intern/BME_tools.c
73         intern/CCGSubSurf.c
74         intern/DerivedMesh.c
75         intern/action.c
76         intern/anim.c
77         intern/anim_sys.c
78         intern/armature.c
79         intern/blender.c
80         intern/bmfont.c
81         intern/boids.c
82         intern/booleanops_mesh.c
83         intern/brush.c
84         intern/bsphere.c
85         intern/bullet.c
86         intern/bvhutils.c
87         intern/cdderivedmesh.c
88         intern/cloth.c
89         intern/collision.c
90         intern/colortools.c
91         intern/constraint.c
92         intern/context.c
93         intern/curve.c
94         intern/customdata.c
95         intern/customdata_file.c
96         intern/deform.c
97         intern/depsgraph.c
98         intern/displist.c
99         intern/effect.c
100         intern/fcurve.c
101         intern/fluidsim.c
102         intern/fmodifier.c
103         intern/font.c
104         intern/gpencil.c
105         intern/group.c
106         intern/icons.c
107         intern/idcode.c
108         intern/idprop.c
109         intern/image.c
110         intern/image_gen.c
111         intern/implicit.c
112         intern/ipo.c
113         intern/key.c
114         intern/lattice.c
115         intern/library.c
116         intern/material.c
117         intern/mball.c
118         intern/mesh.c
119         intern/mesh_validate.c
120         intern/modifier.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/subsurf_ccg.c
145         intern/suggestions.c
146         intern/text.c
147         intern/texture.c
148         intern/unit.c
149         intern/world.c
150         intern/writeavi.c
151         intern/writeffmpeg.c
152         intern/writeframeserver.c
153         
154         BKE_DerivedMesh.h
155         BKE_action.h
156         BKE_anim.h
157         BKE_animsys.h
158         BKE_armature.h
159         BKE_array_mallocn.h
160         BKE_blender.h
161         BKE_bmesh.h
162         BKE_bmeshCustomData.h
163         BKE_bmfont.h
164         BKE_bmfont_types.h
165         BKE_boids.h
166         BKE_booleanops_mesh.h
167         BKE_brush.h
168         BKE_bullet.h
169         BKE_bvhutils.h
170         BKE_cdderivedmesh.h
171         BKE_cloth.h
172         BKE_collision.h
173         BKE_colortools.h
174         BKE_constraint.h
175         BKE_context.h
176         BKE_curve.h
177         BKE_customdata.h
178         BKE_customdata_file.h
179         BKE_deform.h
180         BKE_depsgraph.h
181         BKE_displist.h
182         BKE_effect.h
183         BKE_endian.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_subsurf.h
225         BKE_suggestions.h
226         BKE_text.h
227         BKE_texture.h
228         BKE_unit.h
229         BKE_utildefines.h
230         BKE_world.h
231         BKE_writeavi.h
232         BKE_writeffmpeg.h
233         BKE_writeframeserver.h
234         depsgraph_private.h
235         intern/CCGSubSurf.h
236         intern/bmesh_private.h
237         nla_private.h
238 )
239
240 add_definitions(-DGLEW_STATIC)
241
242 if(WITH_AUDASPACE)
243         list(APPEND INC
244                 ../../../intern/audaspace/intern
245         )
246         add_definitions(-DWITH_AUDASPACE)
247 endif()
248
249 if(WITH_BULLET)
250         list(APPEND INC
251                 ../../../extern/bullet2/src
252         )
253         add_definitions(-DUSE_BULLET)
254 endif()
255
256 if(WITH_MOD_CLOTH_ELTOPO)
257         list(APPEND INC
258                 ../../../extern/eltopo
259         )
260         add_definitions(-DWITH_ELTOPO)
261 endif()
262
263 if(WITH_IMAGE_OPENEXR)
264         add_definitions(-DWITH_OPENEXR)
265 endif()
266
267 if(WITH_IMAGE_TIFF)
268         add_definitions(-DWITH_TIFF)
269 endif()
270
271 if(WITH_IMAGE_OPENJPEG)
272         add_definitions(-DWITH_OPENJPEG)
273 endif()
274
275 if(WITH_IMAGE_DDS)
276         add_definitions(-DWITH_DDS)
277 endif()
278
279 if(WITH_IMAGE_CINEON)
280         add_definitions(-DWITH_CINEON)
281 endif()
282
283 if(WITH_IMAGE_FRAMESERVER)
284         add_definitions(-DWITH_FRAMESERVER)
285 endif()
286
287 if(WITH_IMAGE_HDR)
288         add_definitions(-DWITH_HDR)
289 endif()
290
291 if(WITH_CODEC_QUICKTIME)
292         list(APPEND INC
293                 ../quicktime
294         )
295         list(APPEND INC_SYS
296                 ${QUICKTIME_INCLUDE_DIRS}
297         )
298         add_definitions(-DWITH_QUICKTIME)
299 endif()
300
301 if(WITH_CODEC_FFMPEG)
302         list(APPEND INC
303                 ../../../intern/ffmpeg
304         )
305         list(APPEND INC_SYS
306                 ${FFMPEG_INCLUDE_DIRS}
307         )
308         add_definitions(-DWITH_FFMPEG)
309 endif()
310
311 if(WITH_PYTHON)
312         list(APPEND INC
313                 ../python
314         )
315         list(APPEND INC_SYS
316                 ${PYTHON_INCLUDE_DIRS}
317         )
318         add_definitions(-DWITH_PYTHON)
319
320         if(WITH_PYTHON_SECURITY)
321                 add_definitions(-DWITH_PYTHON_SECURITY)
322         endif()
323 endif()
324
325 if(WITH_OPENMP)
326         add_definitions(-DPARALLEL=1)
327 endif()
328
329 if(NOT WITH_MOD_FLUID)
330         add_definitions(-DDISABLE_ELBEEM)
331 endif()
332
333 if(WITH_MOD_SMOKE)
334         add_definitions(-DWITH_SMOKE)
335 endif()
336
337 if(WITH_JACK)
338         add_definitions(-DWITH_JACK)
339 endif()
340
341 if(WITH_LZO)
342         list(APPEND INC_SYS
343                 ../../../extern/lzo/minilzo
344         )
345         add_definitions(-DWITH_LZO)
346 endif()
347
348 if(WITH_LZMA)
349         list(APPEND INC_SYS
350                 ../../../extern/lzma
351         )
352         add_definitions(-DWITH_LZMA)
353 endif()
354
355 if(MSVC)
356         set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
357 endif()
358
359 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")