328623f884fa810f18ec4cdb6a1642e8829a2c94
[blender-staging.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
35         # For node muting stuff...
36         ../nodes
37         ../nodes/intern
38
39         ../../../intern/glew-mx
40         ../../../intern/guardedalloc
41         ../../../intern/smoke/extern
42 )
43
44 set(INC_SYS
45         ${GLEW_INCLUDE_PATH}
46 )
47
48 set(SRC
49         intern/gpu_buffers.c
50         intern/gpu_codegen.c
51         intern/gpu_draw.c
52         intern/gpu_extensions.c
53         intern/gpu_init_exit.c
54         intern/gpu_material.c
55         intern/gpu_simple_shader.c
56         intern/gpu_select.c
57         intern/gpu_compositing.c
58         intern/gpu_debug.c
59
60         shaders/gpu_program_smoke_frag.glsl
61         shaders/gpu_program_smoke_color_frag.glsl
62
63         shaders/gpu_shader_fx_lib.glsl
64         shaders/gpu_shader_fx_ssao_frag.glsl
65         shaders/gpu_shader_fx_dof_frag.glsl
66         shaders/gpu_shader_fx_dof_vert.glsl
67         shaders/gpu_shader_fx_dof_hq_frag.glsl
68         shaders/gpu_shader_fx_dof_hq_vert.glsl
69         shaders/gpu_shader_fx_dof_hq_geo.glsl
70         shaders/gpu_shader_fx_vert.glsl
71         shaders/gpu_shader_material.glsl
72         shaders/gpu_shader_sep_gaussian_blur_frag.glsl
73         shaders/gpu_shader_sep_gaussian_blur_vert.glsl
74         shaders/gpu_shader_simple_frag.glsl
75         shaders/gpu_shader_simple_vert.glsl
76         shaders/gpu_shader_vertex.glsl
77         shaders/gpu_shader_vsm_store_frag.glsl
78         shaders/gpu_shader_vsm_store_vert.glsl
79         shaders/gpu_shader_fx_depth_resolve.glsl
80
81         GPU_buffers.h
82         GPU_draw.h
83         GPU_debug.h
84         GPU_extensions.h
85         GPU_glew.h
86         GPU_init_exit.h
87         GPU_material.h
88         GPU_simple_shader.h
89         GPU_select.h
90         GPU_compositing.h
91         intern/gpu_codegen.h
92         intern/gpu_private.h
93 )
94
95 data_to_c_simple(shaders/gpu_shader_geometry.glsl SRC)
96 data_to_c_simple(shaders/gpu_program_smoke_frag.glsl SRC)
97 data_to_c_simple(shaders/gpu_program_smoke_color_frag.glsl SRC)
98 data_to_c_simple(shaders/gpu_shader_material.glsl SRC)
99 data_to_c_simple(shaders/gpu_shader_sep_gaussian_blur_frag.glsl SRC)
100 data_to_c_simple(shaders/gpu_shader_sep_gaussian_blur_vert.glsl SRC)
101 data_to_c_simple(shaders/gpu_shader_simple_frag.glsl SRC)
102 data_to_c_simple(shaders/gpu_shader_simple_vert.glsl SRC)
103 data_to_c_simple(shaders/gpu_shader_vertex.glsl SRC)
104 data_to_c_simple(shaders/gpu_shader_vertex_world.glsl SRC)
105 data_to_c_simple(shaders/gpu_shader_vsm_store_frag.glsl SRC)
106 data_to_c_simple(shaders/gpu_shader_vsm_store_vert.glsl SRC)
107 data_to_c_simple(shaders/gpu_shader_fx_vert.glsl SRC)
108 data_to_c_simple(shaders/gpu_shader_fx_ssao_frag.glsl SRC)
109 data_to_c_simple(shaders/gpu_shader_fx_dof_frag.glsl SRC)
110 data_to_c_simple(shaders/gpu_shader_fx_dof_vert.glsl SRC)
111 data_to_c_simple(shaders/gpu_shader_fx_dof_hq_frag.glsl SRC)
112 data_to_c_simple(shaders/gpu_shader_fx_dof_hq_vert.glsl SRC)
113 data_to_c_simple(shaders/gpu_shader_fx_dof_hq_geo.glsl SRC)
114 data_to_c_simple(shaders/gpu_shader_fx_depth_resolve.glsl SRC)
115 data_to_c_simple(shaders/gpu_shader_fx_lib.glsl SRC)
116
117 if(WITH_GAMEENGINE)
118         add_definitions(-DWITH_GAMEENGINE)
119 endif()
120
121 if(WITH_MOD_SMOKE)
122         add_definitions(-DWITH_SMOKE)
123 endif()
124
125 add_definitions(${GL_DEFINITIONS})
126
127 if(WITH_IMAGE_DDS)
128         add_definitions(-DWITH_DDS)
129 endif()
130
131 if(WITH_OPENSUBDIV)
132         add_definitions(-DWITH_OPENSUBDIV)
133 endif()
134
135 blender_add_lib(bf_gpu "${SRC}" "${INC}" "${INC_SYS}")
136