Merged changes in the trunk up to revision 41225.
[blender-staging.git] / source / blender / render / 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
28 set(INC 
29         extern/include
30         intern/include
31         ../blenkernel
32         ../blenlib
33         ../blenloader
34         ../imbuf
35         ../makesdna
36         ../makesrna
37         ../../../intern/guardedalloc
38         ../../../intern/mikktspace
39         ../../../intern/smoke/extern
40         ../freestyle
41 )
42
43 set(INC_SYS
44
45 )
46
47 set(SRC
48         intern/raytrace/rayobject.cpp
49         intern/raytrace/rayobject_empty.cpp
50         intern/raytrace/rayobject_octree.cpp
51         intern/raytrace/rayobject_raycounter.cpp
52         intern/raytrace/rayobject_svbvh.cpp
53         intern/raytrace/rayobject_blibvh.cpp
54         intern/raytrace/rayobject_instance.cpp
55         intern/raytrace/rayobject_qbvh.cpp
56         intern/raytrace/rayobject_rtbuild.cpp
57         intern/raytrace/rayobject_vbvh.cpp
58         intern/source/convertblender.c
59         intern/source/envmap.c
60         intern/source/external_engine.c
61         intern/source/gammaCorrectionTables.c
62         intern/source/imagetexture.c
63         intern/source/initrender.c
64         intern/source/occlusion.c
65         intern/source/pipeline.c
66         intern/source/pixelblending.c
67         intern/source/pixelshading.c
68         intern/source/pointdensity.c
69         intern/source/rayshade.c
70         intern/source/rendercore.c
71         intern/source/render_texture.c
72         intern/source/renderdatabase.c
73         intern/source/shadbuf.c
74         intern/source/shadeinput.c
75         intern/source/shadeoutput.c
76         intern/source/sss.c
77         intern/source/strand.c
78         intern/source/sunsky.c
79         intern/source/volume_precache.c
80         intern/source/volumetric.c
81         intern/source/voxeldata.c
82         intern/source/zbuf.c
83
84         extern/include/RE_engine.h
85         extern/include/RE_pipeline.h
86         extern/include/RE_render_ext.h
87         extern/include/RE_shader_ext.h
88         intern/include/envmap.h
89         intern/include/gammaCorrectionTables.h
90         intern/include/initrender.h
91         intern/include/occlusion.h
92         intern/include/pixelblending.h
93         intern/include/pixelshading.h
94         intern/include/pointdensity.h
95         intern/include/raycounter.h
96         intern/include/rayobject.h
97         intern/include/rayintersection.h
98         intern/include/raycounter.h
99         intern/include/render_types.h
100         intern/include/rendercore.h
101         intern/include/renderdatabase.h
102         intern/include/renderpipeline.h
103         intern/include/shadbuf.h
104         intern/include/shading.h
105         intern/include/sss.h
106         intern/include/strand.h
107         intern/include/sunsky.h
108         intern/include/texture.h
109         intern/include/volume_precache.h
110         intern/include/volumetric.h
111         intern/include/voxeldata.h
112         intern/include/zbuf.h
113         intern/raytrace/bvh.h
114         intern/raytrace/rayobject_hint.h
115         intern/raytrace/rayobject_internal.h
116         intern/raytrace/rayobject_rtbuild.h
117         intern/raytrace/reorganize.h
118         intern/raytrace/svbvh.h
119         intern/raytrace/vbvh.h
120 )
121
122 if(WITH_PYTHON)
123         add_definitions(-DWITH_PYTHON)
124         list(APPEND INC
125                 ../python
126         )
127
128         list(APPEND INC_SYS
129                 ${PYTHON_INCLUDE_DIRS}
130         )
131 endif()
132
133 if(WITH_IMAGE_OPENEXR)
134         add_definitions(-DWITH_OPENEXR)
135 endif()
136
137 if(WITH_MOD_SMOKE)
138         add_definitions(-DWITH_SMOKE)
139 endif()
140
141 if(WITH_CODEC_QUICKTIME)
142         list(APPEND INC
143                 ../quicktime
144         )
145         list(APPEND INC_SYS
146                 ${QUICKTIME_INCLUDE_DIRS}
147         )
148         add_definitions(-DWITH_QUICKTIME)
149 endif()
150
151 if(WITH_GAMEENGINE)
152         add_definitions(-DWITH_GAMEENGINE)
153 endif()
154
155 if(APPLE)
156         if(CMAKE_OSX_ARCHITECTURES MATCHES "i386" OR CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
157                 set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mfpmath=sse")
158                 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mfpmath=sse")
159         endif()
160 endif()
161
162 blender_add_lib_nolist(bf_render "${SRC}" "${INC}" "${INC_SYS}")