Cleanup: remove contributors for CMake files
[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 # ***** END GPL LICENSE BLOCK *****
20
21 # WITH_OPENGL limits the visibility of the opengl headers to just GPU and bg_gpu,
22 # to more easily highlight codepadths in other libraries that need to be refactored,
23 # bf_gpu is allowed to have opengl regardless of this option.
24
25 if(NOT WITH_OPENGL)
26         add_definitions(-DWITH_OPENGL)
27 endif()
28
29 set(INC
30         .
31         ../blenkernel
32         ../blenlib
33         ../bmesh
34         ../imbuf
35         ../makesdna
36         ../makesrna
37         ../draw
38
39         ../editors/include
40
41         # For node muting stuff...
42         ../nodes
43         ../nodes/intern
44
45         ../../../intern/glew-mx
46         ../../../intern/guardedalloc
47         ../../../intern/smoke/extern
48 )
49
50 set(INC_SYS
51         ${GLEW_INCLUDE_PATH}
52 )
53
54 set(SRC
55         intern/gpu_attr_binding.c
56         intern/gpu_batch.c
57         intern/gpu_batch_presets.c
58         intern/gpu_batch_utils.c
59         intern/gpu_buffers.c
60         intern/gpu_codegen.c
61         intern/gpu_context.cpp
62         intern/gpu_debug.c
63         intern/gpu_draw.c
64         intern/gpu_element.c
65         intern/gpu_extensions.c
66         intern/gpu_framebuffer.c
67         intern/gpu_immediate.c
68         intern/gpu_immediate_util.c
69         intern/gpu_init_exit.c
70         intern/gpu_material.c
71         intern/gpu_matrix.c
72         intern/gpu_primitive.c
73         intern/gpu_select.c
74         intern/gpu_select_pick.c
75         intern/gpu_select_sample_query.c
76         intern/gpu_shader.c
77         intern/gpu_shader_interface.c
78         intern/gpu_state.c
79         intern/gpu_texture.c
80         intern/gpu_uniformbuffer.c
81         intern/gpu_vertex_buffer.c
82         intern/gpu_vertex_format.c
83         intern/gpu_viewport.c
84
85         GPU_attr_binding.h
86         GPU_batch.h
87         GPU_batch_presets.h
88         GPU_batch_utils.h
89         GPU_buffers.h
90         GPU_common.h
91         GPU_context.h
92         GPU_debug.h
93         GPU_draw.h
94         GPU_element.h
95         GPU_extensions.h
96         GPU_framebuffer.h
97         GPU_glew.h
98         GPU_immediate.h
99         GPU_immediate_util.h
100         GPU_init_exit.h
101         GPU_legacy_stubs.h
102         GPU_material.h
103         GPU_matrix.h
104         GPU_primitive.h
105         GPU_select.h
106         GPU_shader.h
107         GPU_shader_interface.h
108         GPU_state.h
109         GPU_texture.h
110         GPU_uniformbuffer.h
111         GPU_vertex_buffer.h
112         GPU_vertex_format.h
113         GPU_viewport.h
114
115         intern/gpu_attr_binding_private.h
116         intern/gpu_batch_private.h
117         intern/gpu_codegen.h
118         intern/gpu_context_private.h
119         intern/gpu_primitive_private.h
120         intern/gpu_private.h
121         intern/gpu_select_private.h
122         intern/gpu_shader_private.h
123         intern/gpu_vertex_format_private.h
124 )
125
126 data_to_c_simple(shaders/gpu_shader_depth_only_frag.glsl SRC)
127 data_to_c_simple(shaders/gpu_shader_uniform_color_frag.glsl SRC)
128 data_to_c_simple(shaders/gpu_shader_checker_frag.glsl SRC)
129 data_to_c_simple(shaders/gpu_shader_diag_stripes_frag.glsl SRC)
130 data_to_c_simple(shaders/gpu_shader_simple_lighting_frag.glsl SRC)
131 data_to_c_simple(shaders/gpu_shader_simple_lighting_smooth_color_frag.glsl SRC)
132 data_to_c_simple(shaders/gpu_shader_simple_lighting_smooth_color_alpha_frag.glsl SRC)
133 data_to_c_simple(shaders/gpu_shader_flat_color_frag.glsl SRC)
134 data_to_c_simple(shaders/gpu_shader_flat_color_alpha_test_0_frag.glsl SRC)
135 data_to_c_simple(shaders/gpu_shader_flat_id_frag.glsl SRC)
136 data_to_c_simple(shaders/gpu_shader_2D_vert.glsl SRC)
137 data_to_c_simple(shaders/gpu_shader_2D_area_borders_vert.glsl SRC)
138 data_to_c_simple(shaders/gpu_shader_2D_area_borders_frag.glsl SRC)
139 data_to_c_simple(shaders/gpu_shader_2D_widget_base_vert.glsl SRC)
140 data_to_c_simple(shaders/gpu_shader_2D_widget_base_frag.glsl SRC)
141 data_to_c_simple(shaders/gpu_shader_2D_widget_shadow_vert.glsl SRC)
142 data_to_c_simple(shaders/gpu_shader_2D_widget_shadow_frag.glsl SRC)
143 data_to_c_simple(shaders/gpu_shader_2D_nodelink_frag.glsl SRC)
144 data_to_c_simple(shaders/gpu_shader_2D_nodelink_vert.glsl SRC)
145 data_to_c_simple(shaders/gpu_shader_2D_flat_color_vert.glsl SRC)
146 data_to_c_simple(shaders/gpu_shader_2D_line_dashed_uniform_color_vert.glsl SRC)
147 data_to_c_simple(shaders/gpu_shader_2D_line_dashed_frag.glsl SRC)
148 data_to_c_simple(shaders/gpu_shader_2D_line_dashed_geom.glsl SRC)
149 data_to_c_simple(shaders/gpu_shader_2D_smooth_color_vert.glsl SRC)
150 data_to_c_simple(shaders/gpu_shader_2D_smooth_color_frag.glsl SRC)
151 data_to_c_simple(shaders/gpu_shader_2D_smooth_color_dithered_frag.glsl SRC)
152 data_to_c_simple(shaders/gpu_shader_2D_image_vert.glsl SRC)
153 data_to_c_simple(shaders/gpu_shader_2D_image_rect_vert.glsl SRC)
154 data_to_c_simple(shaders/gpu_shader_2D_image_multi_rect_vert.glsl SRC)
155 data_to_c_simple(shaders/gpu_shader_image_frag.glsl SRC)
156 data_to_c_simple(shaders/gpu_shader_image_desaturate_frag.glsl SRC)
157 data_to_c_simple(shaders/gpu_shader_image_linear_frag.glsl SRC)
158 data_to_c_simple(shaders/gpu_shader_image_shuffle_color_frag.glsl SRC)
159 data_to_c_simple(shaders/gpu_shader_image_mask_uniform_color_frag.glsl SRC)
160 data_to_c_simple(shaders/gpu_shader_image_modulate_alpha_frag.glsl SRC)
161 data_to_c_simple(shaders/gpu_shader_image_alpha_color_frag.glsl SRC)
162 data_to_c_simple(shaders/gpu_shader_image_color_frag.glsl SRC)
163 data_to_c_simple(shaders/gpu_shader_image_varying_color_frag.glsl SRC)
164 data_to_c_simple(shaders/gpu_shader_image_depth_linear_frag.glsl SRC)
165 data_to_c_simple(shaders/gpu_shader_image_depth_copy_frag.glsl SRC)
166 data_to_c_simple(shaders/gpu_shader_image_interlace_frag.glsl SRC)
167 data_to_c_simple(shaders/gpu_shader_image_multisample_resolve_frag.glsl SRC)
168 data_to_c_simple(shaders/gpu_shader_3D_image_vert.glsl SRC)
169 data_to_c_simple(shaders/gpu_shader_3D_vert.glsl SRC)
170 data_to_c_simple(shaders/gpu_shader_3D_normal_vert.glsl SRC)
171 data_to_c_simple(shaders/gpu_shader_3D_flat_color_vert.glsl SRC)
172 data_to_c_simple(shaders/gpu_shader_3D_line_dashed_uniform_color_legacy_vert.glsl SRC)
173 data_to_c_simple(shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl SRC)
174 data_to_c_simple(shaders/gpu_shader_3D_smooth_color_vert.glsl SRC)
175 data_to_c_simple(shaders/gpu_shader_3D_normal_smooth_color_vert.glsl SRC)
176 data_to_c_simple(shaders/gpu_shader_3D_smooth_color_frag.glsl SRC)
177 data_to_c_simple(shaders/gpu_shader_3D_passthrough_vert.glsl SRC)
178 data_to_c_simple(shaders/gpu_shader_3D_clipped_uniform_color_vert.glsl SRC)
179
180 data_to_c_simple(shaders/gpu_shader_instance_vert.glsl SRC)
181 data_to_c_simple(shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl SRC)
182 data_to_c_simple(shaders/gpu_shader_instance_variying_size_variying_id_vert.glsl SRC)
183 data_to_c_simple(shaders/gpu_shader_instance_objectspace_variying_color_vert.glsl SRC)
184 data_to_c_simple(shaders/gpu_shader_instance_screenspace_variying_color_vert.glsl SRC)
185 data_to_c_simple(shaders/gpu_shader_instance_screen_aligned_vert.glsl SRC)
186 data_to_c_simple(shaders/gpu_shader_instance_camera_vert.glsl SRC)
187 data_to_c_simple(shaders/gpu_shader_instance_distance_line_vert.glsl SRC)
188 data_to_c_simple(shaders/gpu_shader_instance_edges_variying_color_geom.glsl SRC)
189 data_to_c_simple(shaders/gpu_shader_instance_edges_variying_color_vert.glsl SRC)
190
191 data_to_c_simple(shaders/gpu_shader_3D_groundline_geom.glsl SRC)
192 data_to_c_simple(shaders/gpu_shader_3D_groundpoint_vert.glsl SRC)
193
194 data_to_c_simple(shaders/gpu_shader_point_uniform_color_frag.glsl SRC)
195 data_to_c_simple(shaders/gpu_shader_point_uniform_color_aa_frag.glsl SRC)
196 data_to_c_simple(shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl SRC)
197 data_to_c_simple(shaders/gpu_shader_point_varying_color_outline_aa_frag.glsl SRC)
198 data_to_c_simple(shaders/gpu_shader_point_varying_color_varying_outline_aa_frag.glsl SRC)
199 data_to_c_simple(shaders/gpu_shader_point_varying_color_frag.glsl SRC)
200 data_to_c_simple(shaders/gpu_shader_3D_point_fixed_size_varying_color_vert.glsl SRC)
201 data_to_c_simple(shaders/gpu_shader_3D_point_varying_size_vert.glsl SRC)
202 data_to_c_simple(shaders/gpu_shader_3D_point_varying_size_varying_color_vert.glsl SRC)
203 data_to_c_simple(shaders/gpu_shader_3D_point_uniform_size_aa_vert.glsl SRC)
204 data_to_c_simple(shaders/gpu_shader_3D_point_uniform_size_outline_aa_vert.glsl SRC)
205 data_to_c_simple(shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl SRC)
206 data_to_c_simple(shaders/gpu_shader_2D_point_uniform_size_aa_vert.glsl SRC)
207 data_to_c_simple(shaders/gpu_shader_2D_point_uniform_size_outline_aa_vert.glsl SRC)
208 data_to_c_simple(shaders/gpu_shader_2D_point_uniform_size_varying_color_outline_aa_vert.glsl SRC)
209
210 data_to_c_simple(shaders/gpu_shader_2D_edituvs_points_vert.glsl SRC)
211 data_to_c_simple(shaders/gpu_shader_2D_edituvs_facedots_vert.glsl SRC)
212 data_to_c_simple(shaders/gpu_shader_2D_edituvs_edges_vert.glsl SRC)
213 data_to_c_simple(shaders/gpu_shader_2D_edituvs_faces_vert.glsl SRC)
214 data_to_c_simple(shaders/gpu_shader_2D_edituvs_stretch_vert.glsl SRC)
215
216 data_to_c_simple(shaders/gpu_shader_3D_selection_id_vert.glsl SRC)
217 data_to_c_simple(shaders/gpu_shader_selection_id_frag.glsl SRC)
218
219 data_to_c_simple(shaders/gpu_shader_edges_front_back_persp_vert.glsl SRC)
220 data_to_c_simple(shaders/gpu_shader_edges_front_back_persp_geom.glsl SRC)
221 data_to_c_simple(shaders/gpu_shader_edges_front_back_persp_legacy_vert.glsl SRC)
222 data_to_c_simple(shaders/gpu_shader_edges_front_back_ortho_vert.glsl SRC)
223 data_to_c_simple(shaders/gpu_shader_edges_overlay_vert.glsl SRC)
224 data_to_c_simple(shaders/gpu_shader_edges_overlay_geom.glsl SRC)
225 data_to_c_simple(shaders/gpu_shader_edges_overlay_simple_geom.glsl SRC)
226 data_to_c_simple(shaders/gpu_shader_edges_overlay_frag.glsl SRC)
227 data_to_c_simple(shaders/gpu_shader_text_simple_vert.glsl SRC)
228 data_to_c_simple(shaders/gpu_shader_text_simple_geom.glsl SRC)
229 data_to_c_simple(shaders/gpu_shader_text_vert.glsl SRC)
230 data_to_c_simple(shaders/gpu_shader_text_geom.glsl SRC)
231 data_to_c_simple(shaders/gpu_shader_text_frag.glsl SRC)
232 data_to_c_simple(shaders/gpu_shader_keyframe_diamond_vert.glsl SRC)
233 data_to_c_simple(shaders/gpu_shader_keyframe_diamond_frag.glsl SRC)
234
235 data_to_c_simple(shaders/gpu_shader_geometry.glsl SRC)
236 data_to_c_simple(shaders/gpu_shader_material.glsl SRC)
237
238 data_to_c_simple(shaders/gpu_shader_gpencil_stroke_vert.glsl SRC)
239 data_to_c_simple(shaders/gpu_shader_gpencil_stroke_frag.glsl SRC)
240 data_to_c_simple(shaders/gpu_shader_gpencil_stroke_geom.glsl SRC)
241
242 data_to_c_simple(shaders/gpu_shader_gpencil_fill_vert.glsl SRC)
243 data_to_c_simple(shaders/gpu_shader_gpencil_fill_frag.glsl SRC)
244
245
246 if(WITH_MOD_SMOKE)
247         add_definitions(-DWITH_SMOKE)
248 endif()
249
250 add_definitions(${GL_DEFINITIONS})
251
252 if(WITH_IMAGE_DDS)
253         add_definitions(-DWITH_DDS)
254 endif()
255
256 blender_add_lib(bf_gpu "${SRC}" "${INC}" "${INC_SYS}")