Reorganizing hair child code a little bit to make it not totally insane.
[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         ../blenfont
29         ../blenlib
30         ../blenloader
31         ../gpu
32         ../ikplugin
33         ../imbuf
34         ../makesdna
35         ../makesrna
36         ../bmesh
37         ../modifiers
38         ../nodes
39         ../physics
40         ../render/extern/include
41         ../../../intern/ghost
42         ../../../intern/guardedalloc
43         ../../../intern/glew-mx
44         ../../../intern/iksolver/extern
45         ../../../intern/memutil
46         ../../../intern/mikktspace
47         ../../../intern/raskter
48         ../../../intern/smoke/extern
49         ../../../intern/atomic
50         ../../../extern/libmv
51
52         # XXX - BAD LEVEL CALL WM_api.h
53         ../windowmanager
54 )
55
56 set(INC_SYS
57         ${GLEW_INCLUDE_PATH}
58         ${ZLIB_INCLUDE_DIRS}
59 )
60
61 set(SRC
62         intern/CCGSubSurf.c
63         intern/DerivedMesh.c
64         intern/action.c
65         intern/addon.c
66         intern/anim.c
67         intern/anim_sys.c
68         intern/appdir.c
69         intern/armature.c
70         intern/autoexec.c
71         intern/blender.c
72         intern/bmfont.c
73         intern/boids.c
74         intern/bpath.c
75         intern/brush.c
76         intern/bullet.c
77         intern/bvhutils.c
78         intern/camera.c
79         intern/cdderivedmesh.c
80         intern/cloth.c
81         intern/collision.c
82         intern/colortools.c
83         intern/constraint.c
84         intern/context.c
85         intern/crazyspace.c
86         intern/curve.c
87         intern/customdata.c
88         intern/customdata_file.c
89         intern/data_transfer.c
90         intern/deform.c
91         intern/depsgraph.c
92         intern/displist.c
93         intern/dynamicpaint.c
94         intern/editderivedmesh.c
95         intern/editmesh.c
96         intern/editmesh_bvh.c
97         intern/effect.c
98         intern/fcurve.c
99         intern/fluidsim.c
100         intern/fmodifier.c
101         intern/font.c
102         intern/freestyle.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/ipo.c
111         intern/key.c
112         intern/lamp.c
113         intern/lattice.c
114         intern/library.c
115         intern/library_query.c
116         intern/linestyle.c
117         intern/mask.c
118         intern/mask_evaluate.c
119         intern/mask_rasterize.c
120         intern/material.c
121         intern/mball.c
122         intern/mesh.c
123         intern/mesh_evaluate.c
124         intern/mesh_mapping.c
125         intern/mesh_remap.c
126         intern/mesh_validate.c
127         intern/modifier.c
128         intern/modifiers_bmesh.c
129         intern/movieclip.c
130         intern/multires.c
131         intern/nla.c
132         intern/node.c
133         intern/object.c
134         intern/object_deform.c
135         intern/object_dupli.c
136         intern/ocean.c
137         intern/packedFile.c
138         intern/paint.c
139         intern/particle.c
140         intern/particle_child.c
141         intern/particle_distribute.c
142         intern/particle_system.c
143         intern/pbvh.c
144         intern/pbvh_bmesh.c
145         intern/pointcache.c
146         intern/property.c
147         intern/report.c
148         intern/rigidbody.c
149         intern/sca.c
150         intern/scene.c
151         intern/screen.c
152         intern/seqcache.c
153         intern/seqeffects.c
154         intern/seqmodifier.c
155         intern/sequencer.c
156         intern/shrinkwrap.c
157         intern/sketch.c
158         intern/smoke.c
159         intern/softbody.c
160         intern/sound.c
161         intern/speaker.c
162         intern/subsurf_ccg.c
163         intern/suggestions.c
164         intern/text.c
165         intern/texture.c
166         intern/tracking.c
167         intern/tracking_auto.c
168         intern/tracking_detect.c
169         intern/tracking_plane_tracker.c
170         intern/tracking_region_tracker.c
171         intern/tracking_solver.c
172         intern/tracking_stabilize.c
173         intern/tracking_util.c
174         intern/treehash.c
175         intern/unit.c
176         intern/world.c
177         intern/writeavi.c
178         intern/writeframeserver.c
179
180         BKE_DerivedMesh.h
181         BKE_action.h
182         BKE_addon.h
183         BKE_anim.h
184         BKE_animsys.h
185         BKE_appdir.h
186         BKE_armature.h
187         BKE_autoexec.h
188         BKE_blender.h
189         BKE_bmfont.h
190         BKE_bmfont_types.h
191         BKE_boids.h
192         BKE_bpath.h
193         BKE_brush.h
194         BKE_bullet.h
195         BKE_bvhutils.h
196         BKE_camera.h
197         BKE_ccg.h
198         BKE_cdderivedmesh.h
199         BKE_cloth.h
200         BKE_collision.h
201         BKE_colortools.h
202         BKE_constraint.h
203         BKE_context.h
204         BKE_crazyspace.h
205         BKE_curve.h
206         BKE_customdata.h
207         BKE_customdata_file.h
208         BKE_data_transfer.h
209         BKE_deform.h
210         BKE_depsgraph.h
211         BKE_displist.h
212         BKE_dynamicpaint.h
213         BKE_effect.h
214         BKE_fcurve.h
215         BKE_fluidsim.h
216         BKE_font.h
217         BKE_freestyle.h
218         BKE_global.h
219         BKE_gpencil.h
220         BKE_group.h
221         BKE_icons.h
222         BKE_idcode.h
223         BKE_idprop.h
224         BKE_image.h
225         BKE_ipo.h
226         BKE_key.h
227         BKE_lamp.h
228         BKE_lattice.h
229         BKE_library.h
230         BKE_library_query.h
231         BKE_linestyle.h
232         BKE_main.h
233         BKE_mask.h
234         BKE_material.h
235         BKE_mball.h
236         BKE_mesh.h
237         BKE_mesh_mapping.h
238         BKE_mesh_remap.h
239         BKE_modifier.h
240         BKE_movieclip.h
241         BKE_multires.h
242         BKE_nla.h
243         BKE_node.h
244         BKE_object.h
245         BKE_object_deform.h
246         BKE_ocean.h
247         BKE_packedFile.h
248         BKE_paint.h
249         BKE_particle.h
250         BKE_pbvh.h
251         BKE_pointcache.h
252         BKE_property.h
253         BKE_report.h
254         BKE_rigidbody.h
255         BKE_sca.h
256         BKE_scene.h
257         BKE_screen.h
258         BKE_sequencer.h
259         BKE_shrinkwrap.h
260         BKE_sketch.h
261         BKE_smoke.h
262         BKE_softbody.h
263         BKE_sound.h
264         BKE_speaker.h
265         BKE_subsurf.h
266         BKE_suggestions.h
267         BKE_editmesh.h
268         BKE_editmesh_bvh.h
269         BKE_text.h
270         BKE_texture.h
271         BKE_tracking.h
272         BKE_treehash.h
273         BKE_unit.h
274         BKE_utildefines.h
275         BKE_world.h
276         BKE_writeavi.h
277         BKE_writeframeserver.h
278
279         depsgraph_private.h
280         nla_private.h
281         tracking_private.h
282         intern/CCGSubSurf.h
283         intern/pbvh_intern.h
284         intern/data_transfer_intern.h
285 )
286
287 if(WITH_BINRELOC)
288         list(APPEND INC_SYS
289                 ${BINRELOC_INCLUDE_DIRS}
290         )
291         add_definitions(-DWITH_BINRELOC)
292 endif()
293
294 add_definitions(${GL_DEFINITIONS})
295
296 if(WIN32)
297         list(APPEND INC
298                 ../../../intern/utfconv
299         )
300 endif()
301
302 if(WITH_AUDASPACE)
303         list(APPEND INC
304                 ../../../intern/audaspace/intern
305         )
306         add_definitions(-DWITH_AUDASPACE)
307 endif()
308
309 if(WITH_BULLET)
310         list(APPEND INC_SYS
311                 ${BULLET_INCLUDE_DIRS}
312         )
313         list(APPEND INC
314                 ../../../intern/rigidbody
315         )
316         add_definitions(-DWITH_BULLET)
317 endif()
318
319 #if(WITH_MOD_CLOTH_ELTOPO)
320 #       list(APPEND INC
321 #               ../../../extern/eltopo
322 #               ../../../extern/eltopo/eltopo3d
323 #       )
324 #       add_definitions(-DWITH_ELTOPO)
325 #endif()
326
327 if(WITH_IMAGE_OPENEXR)
328         add_definitions(-DWITH_OPENEXR)
329 endif()
330
331 if(WITH_IMAGE_TIFF)
332         add_definitions(-DWITH_TIFF)
333 endif()
334
335 if(WITH_OPENIMAGEIO)
336         add_definitions(-DWITH_OPENIMAGEIO)
337 endif()
338
339 if(WITH_IMAGE_OPENJPEG)
340         add_definitions(-DWITH_OPENJPEG)
341 endif()
342
343 if(WITH_IMAGE_DDS)
344         add_definitions(-DWITH_DDS)
345 endif()
346
347 if(WITH_IMAGE_CINEON)
348         add_definitions(-DWITH_CINEON)
349 endif()
350
351 if(WITH_IMAGE_FRAMESERVER)
352         add_definitions(-DWITH_FRAMESERVER)
353 endif()
354
355 if(WITH_IMAGE_HDR)
356         add_definitions(-DWITH_HDR)
357 endif()
358
359 if(WITH_CODEC_AVI)
360         list(APPEND INC
361                 ../avi
362         )
363         add_definitions(-DWITH_AVI)
364 endif()
365
366 if(WITH_CODEC_QUICKTIME)
367         list(APPEND INC
368                 ../quicktime
369         )
370         list(APPEND INC_SYS
371                 ${QUICKTIME_INCLUDE_DIRS}
372         )
373         add_definitions(-DWITH_QUICKTIME)
374 endif()
375
376 if(WITH_CODEC_FFMPEG)
377         list(APPEND SRC
378                 intern/writeffmpeg.c
379                 BKE_writeffmpeg.h
380         )
381         list(APPEND INC
382                 ../../../intern/ffmpeg
383         )
384         list(APPEND INC_SYS
385                 ${FFMPEG_INCLUDE_DIRS}
386         )
387         add_definitions(-DWITH_FFMPEG)
388
389         remove_strict_flags_file(
390                 intern/writeffmpeg.c
391         )
392 endif()
393
394 if(WITH_PYTHON)
395         list(APPEND INC
396                 ../python
397         )
398         add_definitions(-DWITH_PYTHON)
399
400         if(WITH_PYTHON_SECURITY)
401                 add_definitions(-DWITH_PYTHON_SECURITY)
402         endif()
403 endif()
404
405 if(WITH_MOD_FLUID)
406         list(APPEND INC
407                 ../../../intern/elbeem/extern
408         )
409         add_definitions(-DWITH_MOD_FLUID)
410 endif()
411
412 if(WITH_MOD_SMOKE)
413         add_definitions(-DWITH_SMOKE)
414 endif()
415
416 if(WITH_MOD_OCEANSIM)
417         add_definitions(-DWITH_OCEANSIM)
418 endif()
419
420 if(WITH_JACK)
421         add_definitions(-DWITH_JACK)
422 endif()
423
424 if(WITH_LZO)
425         list(APPEND INC_SYS
426                 ../../../extern/lzo/minilzo
427         )
428         add_definitions(-DWITH_LZO)
429 endif()
430
431 if(WITH_LZMA)
432         list(APPEND INC_SYS
433                 ../../../extern/lzma
434         )
435         add_definitions(-DWITH_LZMA)
436 endif()
437
438 if(WITH_GAMEENGINE)
439         list(APPEND INC_SYS
440                 ../../../extern/recastnavigation
441         )
442         list(APPEND SRC
443                 intern/navmesh_conversion.c
444                 BKE_navmesh_conversion.h
445         )
446
447         add_definitions(-DWITH_GAMEENGINE)
448 endif()
449
450 if(WITH_LIBMV)
451         add_definitions(-DWITH_LIBMV)
452 endif()
453
454 if(WITH_FFTW3)
455         list(APPEND INC_SYS
456                 ${FFTW3_INCLUDE_DIRS}
457         )
458         add_definitions(-DFFTW3=1)
459 endif()
460
461 if(WITH_INTERNATIONAL)
462         add_definitions(-DWITH_INTERNATIONAL)
463 endif()
464
465 if(WITH_FREESTYLE)
466         add_definitions(-DWITH_FREESTYLE)
467 endif()
468
469 ## Warnings as errors, this is too strict!
470 #if(MSVC)
471 #       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
472 #endif()
473
474 blender_add_lib(bf_blenkernel "${SRC}" "${INC}" "${INC_SYS}")