- Update to r53061
[reactos.git] / dll / 3rdparty / mesa32 / CMakeLists.txt
1
2 if(NOT MSVC)
3 add_compiler_flags(-w)
4 endif()
5
6 add_definitions(
7 -DUSE_EXTERNAL_DXTN_LIB=1
8 -DBUILD_GL32
9 -DWIN32
10 -DUSE_3DNOW_ASM)
11
12 if(ARCH MATCHES i386)
13 add_definitions(
14 -DUSE_X86_ASM
15 -DUSE_MMX_ASM
16 -DUSE_SSE_ASM)
17 else()
18 add_definitions(-DGL_NO_STDCALL)
19 endif(ARCH MATCHES i386)
20
21 if(NOT MSVC)
22 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS_INIT} -Wl,--enable-stdcall-fixup")
23 endif()
24
25 include_directories(
26 BEFORE include
27 src
28 src/main
29 src/glapi
30 src/math
31 src/tnl
32 src/shader
33 src/shader/grammar
34 src/shader/slang
35 src/shader/slang/OSDependent/Linux
36 src/shader/slang/OGLCompilersDLL)
37
38 list(APPEND SOURCE
39 src/drivers/common/driverfuncs.c
40 src/drivers/windows/gdi/wgl.c
41 src/drivers/windows/gdi/wmesa.c
42 src/drivers/windows/icd/icd.c
43 src/glapi/glapi.c
44 src/glapi/glapi_getproc.c
45 src/glapi/glthread.c
46 src/main/accum.c
47 src/main/api_arrayelt.c
48 src/main/api_exec.c
49 src/main/api_loopback.c
50 src/main/api_noop.c
51 src/main/api_validate.c
52 src/main/arrayobj.c
53 src/main/attrib.c
54 src/main/blend.c
55 src/main/bufferobj.c
56 src/main/buffers.c
57 src/main/clear.c
58 src/main/clip.c
59 src/main/colortab.c
60 src/main/context.c
61 src/main/convolve.c
62 src/main/debug.c
63 src/main/depth.c
64 src/main/depthstencil.c
65 src/main/dispatch.c
66 src/main/dlist.c
67 src/main/dlopen.c
68 src/main/drawpix.c
69 src/main/enable.c
70 src/main/enums.c
71 src/main/eval.c
72 src/main/execmem.c
73 src/main/extensions.c
74 src/main/fbobject.c
75 src/main/feedback.c
76 src/main/ffvertex_prog.c
77 src/main/fog.c
78 src/main/framebuffer.c
79 src/main/get.c
80 src/main/getstring.c
81 src/main/hash.c
82 src/main/hint.c
83 src/main/histogram.c
84 src/main/image.c
85 src/main/imports.c
86 src/main/light.c
87 src/main/lines.c
88 src/main/matrix.c
89 src/main/mipmap.c
90 src/main/mm.c
91 src/main/multisample.c
92 src/main/pixel.c
93 src/main/pixelstore.c
94 src/main/points.c
95 src/main/polygon.c
96 src/main/queryobj.c
97 src/main/rastpos.c
98 src/main/rbadaptors.c
99 src/main/readpix.c
100 src/main/renderbuffer.c
101 src/main/scissor.c
102 src/main/shaders.c
103 src/main/state.c
104 src/main/stencil.c
105 src/main/texcompress.c
106 src/main/texcompress_fxt1.c
107 src/main/texcompress_s3tc.c
108 src/main/texenv.c
109 src/main/texenvprogram.c
110 src/main/texformat.c
111 src/main/texgen.c
112 src/main/teximage.c
113 src/main/texobj.c
114 src/main/texparam.c
115 src/main/texrender.c
116 src/main/texstate.c
117 src/main/texstore.c
118 src/main/varray.c
119 src/main/vtxfmt.c
120 src/math/m_debug_clip.c
121 src/math/m_debug_norm.c
122 src/math/m_debug_xform.c
123 src/math/m_eval.c
124 src/math/m_matrix.c
125 src/math/m_translate.c
126 src/math/m_vector.c
127 src/math/m_xform.c
128 src/shader/arbprogparse.c
129 src/shader/arbprogram.c
130 src/shader/atifragshader.c
131 src/shader/grammar/grammar_mesa.c
132 src/shader/nvfragparse.c
133 src/shader/nvprogram.c
134 src/shader/nvvertparse.c
135 src/shader/program.c
136 src/shader/programopt.c
137 src/shader/prog_cache.c
138 src/shader/prog_debug.c
139 src/shader/prog_execute.c
140 src/shader/prog_instruction.c
141 src/shader/prog_noise.c
142 src/shader/prog_parameter.c
143 src/shader/prog_print.c
144 src/shader/prog_statevars.c
145 src/shader/prog_uniform.c
146 src/shader/shader_api.c
147 src/shader/slang/slang_builtin.c
148 src/shader/slang/slang_codegen.c
149 src/shader/slang/slang_compile.c
150 src/shader/slang/slang_compile_function.c
151 src/shader/slang/slang_compile_operation.c
152 src/shader/slang/slang_compile_struct.c
153 src/shader/slang/slang_compile_variable.c
154 src/shader/slang/slang_emit.c
155 src/shader/slang/slang_ir.c
156 src/shader/slang/slang_label.c
157 src/shader/slang/slang_link.c
158 src/shader/slang/slang_log.c
159 src/shader/slang/slang_mem.c
160 src/shader/slang/slang_preprocess.c
161 src/shader/slang/slang_print.c
162 src/shader/slang/slang_simplify.c
163 src/shader/slang/slang_storage.c
164 src/shader/slang/slang_typeinfo.c
165 src/shader/slang/slang_utility.c
166 src/shader/slang/slang_vartable.c
167 src/swrast/s_aaline.c
168 src/swrast/s_aatriangle.c
169 src/swrast/s_accum.c
170 src/swrast/s_alpha.c
171 src/swrast/s_atifragshader.c
172 src/swrast/s_bitmap.c
173 src/swrast/s_blend.c
174 src/swrast/s_blit.c
175 src/swrast/s_buffers.c
176 src/swrast/s_context.c
177 src/swrast/s_copypix.c
178 src/swrast/s_depth.c
179 src/swrast/s_drawpix.c
180 src/swrast/s_feedback.c
181 src/swrast/s_fog.c
182 src/swrast/s_fragprog.c
183 src/swrast/s_imaging.c
184 src/swrast/s_lines.c
185 src/swrast/s_logic.c
186 src/swrast/s_masking.c
187 src/swrast/s_points.c
188 src/swrast/s_readpix.c
189 src/swrast/s_span.c
190 src/swrast/s_stencil.c
191 src/swrast/s_texcombine.c
192 src/swrast/s_texfilter.c
193 src/swrast/s_texstore.c
194 src/swrast/s_triangle.c
195 src/swrast/s_zoom.c
196 src/swrast_setup/ss_context.c
197 src/swrast_setup/ss_triangle.c
198 src/tnl/t_context.c
199 src/tnl/t_draw.c
200 src/tnl/t_pipeline.c
201 src/tnl/t_rasterpos.c
202 src/tnl/t_vb_cull.c
203 src/tnl/t_vb_fog.c
204 src/tnl/t_vb_light.c
205 src/tnl/t_vb_normals.c
206 src/tnl/t_vb_points.c
207 src/tnl/t_vb_program.c
208 src/tnl/t_vb_render.c
209 src/tnl/t_vb_texgen.c
210 src/tnl/t_vb_texmat.c
211 src/tnl/t_vb_vertex.c
212 src/tnl/t_vertex.c
213 src/tnl/t_vertex_generic.c
214 src/tnl/t_vp_build.c
215 src/vbo/vbo_context.c
216 src/vbo/vbo_exec.c
217 src/vbo/vbo_exec_api.c
218 src/vbo/vbo_exec_array.c
219 src/vbo/vbo_exec_draw.c
220 src/vbo/vbo_exec_eval.c
221 src/vbo/vbo_rebase.c
222 src/vbo/vbo_save.c
223 src/vbo/vbo_save_api.c
224 src/vbo/vbo_save_draw.c
225 src/vbo/vbo_save_loopback.c
226 src/vbo/vbo_split.c
227 src/vbo/vbo_split_copy.c
228 src/vbo/vbo_split_inplace.c
229 src/drivers/windows/icd/mesa.def)
230
231 if(ARCH MATCHES i386)
232 list(APPEND SOURCE
233 src/tnl/t_vertex_sse.c
234 src/x86/3dnow.c
235 src/x86/3dnow_normal.S
236 src/x86/3dnow_xform1.S
237 src/x86/3dnow_xform2.S
238 src/x86/3dnow_xform3.S
239 src/x86/3dnow_xform4.S
240 src/x86/common_x86.c
241 src/x86/common_x86_asm.S
242 src/x86/glapi_x86.S
243 src/x86/mmx_blend.S
244 src/x86/read_rgba_span_x86.S
245 src/x86/sse_normal.S
246 src/x86/sse_xform1.S
247 src/x86/sse_xform2.S
248 src/x86/sse_xform3.S
249 src/x86/sse_xform4.S
250 src/x86/sse.c
251 src/x86/x86.c
252 src/x86/x86_cliptest.S
253 src/x86/x86_xform2.S
254 src/x86/x86_xform3.S
255 src/x86/x86_xform4.S
256 src/x86/rtasm/x86sse.c)
257 else()
258 list(APPEND SOURCE src/x86-64/x86-64.c src/x86-64/xform4.S)
259 endif()
260
261 add_library(mesa32 SHARED ${SOURCE})
262 add_pch(mesa32 src/main/glheader.h)
263 set_entrypoint(mesa32 0)
264 add_importlibs(mesa32 gdi32 user32 msvcrt kernel32 ntdll)
265 add_dependencies(mesa32 psdk)
266 add_cd_file(TARGET mesa32 DESTINATION reactos/system32 FOR all)