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