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