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