Merge branch 'master' into blender2.8
[blender.git] / source / blender / gpu / 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         ../blenkernel
29         ../blenlib
30         ../bmesh
31         ../imbuf
32         ../makesdna
33         ../makesrna
34         ../draw
35
36         ../editors/include
37
38         # For node muting stuff...
39         ../nodes
40         ../nodes/intern
41
42         ../../../intern/glew-mx
43         ../../../intern/guardedalloc
44         ../../../intern/smoke/extern
45         ../../../intern/gawain
46 )
47
48 set(INC_SYS
49         ${GLEW_INCLUDE_PATH}
50 )
51
52 set(SRC
53         intern/gpu_basic_shader.c
54         intern/gpu_batch.c
55         intern/gpu_batch_presets.c
56         intern/gpu_buffers.c
57         intern/gpu_codegen.c
58         intern/gpu_debug.c
59         intern/gpu_draw.c
60         intern/gpu_extensions.c
61         intern/gpu_framebuffer.c
62         intern/gpu_immediate.c
63         intern/gpu_immediate_util.c
64         intern/gpu_init_exit.c
65         intern/gpu_material.c
66         intern/gpu_matrix.c
67         intern/gpu_select.c
68         intern/gpu_select_pick.c
69         intern/gpu_select_sample_query.c
70         intern/gpu_shader.c
71         intern/gpu_texture.c
72         intern/gpu_uniformbuffer.c
73         intern/gpu_viewport.c
74
75         shaders/gpu_shader_fx_lib.glsl
76         shaders/gpu_shader_fx_ssao_frag.glsl
77         shaders/gpu_shader_fx_dof_frag.glsl
78         shaders/gpu_shader_fx_dof_vert.glsl
79         shaders/gpu_shader_fx_dof_hq_frag.glsl
80         shaders/gpu_shader_fx_dof_hq_vert.glsl
81         shaders/gpu_shader_fx_dof_hq_geo.glsl
82         shaders/gpu_shader_material.glsl
83         shaders/gpu_shader_sep_gaussian_blur_frag.glsl
84         shaders/gpu_shader_sep_gaussian_blur_vert.glsl
85         shaders/gpu_shader_basic_frag.glsl
86         shaders/gpu_shader_basic_vert.glsl
87         shaders/gpu_shader_basic_geom.glsl
88         shaders/gpu_shader_vertex.glsl
89         shaders/gpu_shader_vsm_store_frag.glsl
90         shaders/gpu_shader_vsm_store_vert.glsl
91         shaders/gpu_shader_fx_depth_resolve.glsl
92         shaders/gpu_shader_fire_frag.glsl
93         shaders/gpu_shader_smoke_frag.glsl
94         shaders/gpu_shader_smoke_vert.glsl
95
96         GPU_basic_shader.h
97         GPU_batch.h
98         GPU_buffers.h
99         GPU_debug.h
100         GPU_draw.h
101         GPU_extensions.h
102         GPU_framebuffer.h
103         GPU_glew.h
104         GPU_immediate.h
105         GPU_immediate_util.h
106         GPU_init_exit.h
107         GPU_legacy_stubs.h
108         GPU_material.h
109         GPU_matrix.h
110         GPU_select.h
111         GPU_shader.h
112         GPU_texture.h
113         GPU_uniformbuffer.h
114         GPU_viewport.h
115
116         intern/gpu_codegen.h
117         intern/gpu_private.h
118         intern/gpu_select_private.h
119         intern/gpu_shader_private.h
120 )
121
122 data_to_c_simple(shaders/gpu_shader_depth_only_frag.glsl SRC)
123 data_to_c_simple(shaders/gpu_shader_uniform_color_frag.glsl SRC)
124 data_to_c_simple(shaders/gpu_shader_checker_frag.glsl SRC)
125 data_to_c_simple(shaders/gpu_shader_diag_stripes_frag.glsl SRC)
126 data_to_c_simple(shaders/gpu_shader_simple_lighting_frag.glsl SRC)
127 data_to_c_simple(shaders/gpu_shader_simple_lighting_smooth_color_frag.glsl SRC)
128 data_to_c_simple(shaders/gpu_shader_simple_lighting_smooth_color_alpha_frag.glsl SRC)
129 data_to_c_simple(shaders/gpu_shader_flat_color_frag.glsl SRC)
130 data_to_c_simple(shaders/gpu_shader_flat_color_alpha_test_0_frag.glsl SRC)
131 data_to_c_simple(shaders/gpu_shader_flat_id_frag.glsl SRC)
132 data_to_c_simple(shaders/gpu_shader_2D_vert.glsl SRC)
133 data_to_c_simple(shaders/gpu_shader_2D_widget_base_vert.glsl SRC)
134 data_to_c_simple(shaders/gpu_shader_2D_widget_base_frag.glsl SRC)
135 data_to_c_simple(shaders/gpu_shader_2D_widget_shadow_vert.glsl SRC)
136 data_to_c_simple(shaders/gpu_shader_2D_widget_shadow_frag.glsl SRC)
137 data_to_c_simple(shaders/gpu_shader_2D_nodelink_frag.glsl SRC)
138 data_to_c_simple(shaders/gpu_shader_2D_nodelink_vert.glsl SRC)
139 data_to_c_simple(shaders/gpu_shader_2D_flat_color_vert.glsl SRC)
140 data_to_c_simple(shaders/gpu_shader_2D_line_dashed_uniform_color_vert.glsl SRC)
141 data_to_c_simple(shaders/gpu_shader_2D_line_dashed_frag.glsl SRC)
142 data_to_c_simple(shaders/gpu_shader_2D_line_dashed_geom.glsl SRC)
143 data_to_c_simple(shaders/gpu_shader_2D_smooth_color_vert.glsl SRC)
144 data_to_c_simple(shaders/gpu_shader_2D_smooth_color_frag.glsl SRC)
145 data_to_c_simple(shaders/gpu_shader_2D_smooth_color_dithered_frag.glsl SRC)
146 data_to_c_simple(shaders/gpu_shader_2D_image_vert.glsl SRC)
147 data_to_c_simple(shaders/gpu_shader_2D_image_rect_vert.glsl SRC)
148 data_to_c_simple(shaders/gpu_shader_2D_image_multi_rect_vert.glsl SRC)
149 data_to_c_simple(shaders/gpu_shader_image_frag.glsl SRC)
150 data_to_c_simple(shaders/gpu_shader_image_desaturate_frag.glsl SRC)
151 data_to_c_simple(shaders/gpu_shader_image_linear_frag.glsl SRC)
152 data_to_c_simple(shaders/gpu_shader_image_shuffle_color_frag.glsl SRC)
153 data_to_c_simple(shaders/gpu_shader_image_mask_uniform_color_frag.glsl SRC)
154 data_to_c_simple(shaders/gpu_shader_image_modulate_alpha_frag.glsl SRC)
155 data_to_c_simple(shaders/gpu_shader_image_alpha_color_frag.glsl SRC)
156 data_to_c_simple(shaders/gpu_shader_image_color_frag.glsl SRC)
157 data_to_c_simple(shaders/gpu_shader_image_varying_color_frag.glsl SRC)
158 data_to_c_simple(shaders/gpu_shader_image_depth_linear_frag.glsl SRC)
159 data_to_c_simple(shaders/gpu_shader_image_depth_copy_frag.glsl SRC)
160 data_to_c_simple(shaders/gpu_shader_image_interlace_frag.glsl SRC)
161 data_to_c_simple(shaders/gpu_shader_image_multisample_resolve_frag.glsl SRC)
162 data_to_c_simple(shaders/gpu_shader_3D_image_vert.glsl SRC)
163 data_to_c_simple(shaders/gpu_shader_3D_vert.glsl SRC)
164 data_to_c_simple(shaders/gpu_shader_3D_normal_vert.glsl SRC)
165 data_to_c_simple(shaders/gpu_shader_3D_flat_color_vert.glsl SRC)
166 data_to_c_simple(shaders/gpu_shader_3D_line_dashed_uniform_color_legacy_vert.glsl SRC)
167 data_to_c_simple(shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl SRC)
168 data_to_c_simple(shaders/gpu_shader_3D_smooth_color_vert.glsl SRC)
169 data_to_c_simple(shaders/gpu_shader_3D_normal_smooth_color_vert.glsl SRC)
170 data_to_c_simple(shaders/gpu_shader_3D_smooth_color_frag.glsl SRC)
171 data_to_c_simple(shaders/gpu_shader_3D_passthrough_vert.glsl SRC)
172 data_to_c_simple(shaders/gpu_shader_3D_clipped_uniform_color_vert.glsl SRC)
173
174 data_to_c_simple(shaders/gpu_shader_instance_vert.glsl SRC)
175 data_to_c_simple(shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl SRC)
176 data_to_c_simple(shaders/gpu_shader_instance_variying_size_variying_id_vert.glsl SRC)
177 data_to_c_simple(shaders/gpu_shader_instance_objectspace_variying_color_vert.glsl SRC)
178 data_to_c_simple(shaders/gpu_shader_instance_screenspace_variying_color_vert.glsl SRC)
179 data_to_c_simple(shaders/gpu_shader_instance_screen_aligned_vert.glsl SRC)
180 data_to_c_simple(shaders/gpu_shader_instance_camera_vert.glsl SRC)
181 data_to_c_simple(shaders/gpu_shader_instance_distance_line_vert.glsl SRC)
182 data_to_c_simple(shaders/gpu_shader_instance_edges_variying_color_geom.glsl SRC)
183 data_to_c_simple(shaders/gpu_shader_instance_edges_variying_color_vert.glsl SRC)
184
185 data_to_c_simple(shaders/gpu_shader_3D_groundline_geom.glsl SRC)
186 data_to_c_simple(shaders/gpu_shader_3D_groundpoint_vert.glsl SRC)
187
188 data_to_c_simple(shaders/gpu_shader_point_uniform_color_frag.glsl SRC)
189 data_to_c_simple(shaders/gpu_shader_point_uniform_color_aa_frag.glsl SRC)
190 data_to_c_simple(shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl SRC)
191 data_to_c_simple(shaders/gpu_shader_point_varying_color_outline_aa_frag.glsl SRC)
192 data_to_c_simple(shaders/gpu_shader_point_varying_color_frag.glsl SRC)
193 data_to_c_simple(shaders/gpu_shader_3D_point_fixed_size_varying_color_vert.glsl SRC)
194 data_to_c_simple(shaders/gpu_shader_3D_point_varying_size_vert.glsl SRC)
195 data_to_c_simple(shaders/gpu_shader_3D_point_varying_size_varying_color_vert.glsl SRC)
196 data_to_c_simple(shaders/gpu_shader_3D_point_uniform_size_aa_vert.glsl SRC)
197 data_to_c_simple(shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl SRC)
198 data_to_c_simple(shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl SRC)
199 data_to_c_simple(shaders/gpu_shader_2D_point_uniform_size_aa_vert.glsl SRC)
200 data_to_c_simple(shaders/gpu_shader_2D_point_uniform_size_outline_aa_vert.glsl SRC)
201 data_to_c_simple(shaders/gpu_shader_2D_point_uniform_size_varying_color_outline_aa_vert.glsl SRC)
202
203 data_to_c_simple(shaders/gpu_shader_edges_front_back_persp_vert.glsl SRC)
204 data_to_c_simple(shaders/gpu_shader_edges_front_back_persp_geom.glsl SRC)
205 data_to_c_simple(shaders/gpu_shader_edges_front_back_persp_legacy_vert.glsl SRC)
206 data_to_c_simple(shaders/gpu_shader_edges_front_back_ortho_vert.glsl SRC)
207 data_to_c_simple(shaders/gpu_shader_edges_overlay_vert.glsl SRC)
208 data_to_c_simple(shaders/gpu_shader_edges_overlay_geom.glsl SRC)
209 data_to_c_simple(shaders/gpu_shader_edges_overlay_simple_geom.glsl SRC)
210 data_to_c_simple(shaders/gpu_shader_edges_overlay_frag.glsl SRC)
211 data_to_c_simple(shaders/gpu_shader_text_simple_vert.glsl SRC)
212 data_to_c_simple(shaders/gpu_shader_text_simple_geom.glsl SRC)
213 data_to_c_simple(shaders/gpu_shader_text_vert.glsl SRC)
214 data_to_c_simple(shaders/gpu_shader_text_geom.glsl SRC)
215 data_to_c_simple(shaders/gpu_shader_text_frag.glsl SRC)
216 data_to_c_simple(shaders/gpu_shader_keyframe_diamond_vert.glsl SRC)
217 data_to_c_simple(shaders/gpu_shader_keyframe_diamond_frag.glsl SRC)
218
219 data_to_c_simple(shaders/gpu_shader_geometry.glsl SRC)
220 data_to_c_simple(shaders/gpu_shader_fire_frag.glsl SRC)
221 data_to_c_simple(shaders/gpu_shader_smoke_frag.glsl SRC)
222 data_to_c_simple(shaders/gpu_shader_smoke_vert.glsl SRC)
223 data_to_c_simple(shaders/gpu_shader_material.glsl SRC)
224 data_to_c_simple(shaders/gpu_shader_sep_gaussian_blur_frag.glsl SRC)
225 data_to_c_simple(shaders/gpu_shader_sep_gaussian_blur_vert.glsl SRC)
226 data_to_c_simple(shaders/gpu_shader_basic_frag.glsl SRC)
227 data_to_c_simple(shaders/gpu_shader_basic_vert.glsl SRC)
228 data_to_c_simple(shaders/gpu_shader_basic_geom.glsl SRC)
229 data_to_c_simple(shaders/gpu_shader_vertex.glsl SRC)
230 data_to_c_simple(shaders/gpu_shader_vertex_world.glsl SRC)
231 data_to_c_simple(shaders/gpu_shader_vsm_store_frag.glsl SRC)
232 data_to_c_simple(shaders/gpu_shader_vsm_store_vert.glsl SRC)
233
234 if(WITH_MOD_SMOKE)
235         add_definitions(-DWITH_SMOKE)
236 endif()
237
238 add_definitions(${GL_DEFINITIONS})
239
240 if(WITH_IMAGE_DDS)
241         add_definitions(-DWITH_DDS)
242 endif()
243
244 if(WITH_OPENSUBDIV)
245         add_definitions(-DWITH_OPENSUBDIV)
246 endif()
247
248 blender_add_lib(bf_gpu "${SRC}" "${INC}" "${INC_SYS}")
249