a8bdc3e58693543e73763bd44c812bf701439b0b
[mesa.git] / src / gallium / targets / libgl-gdi / SConscript
1 #######################################################################
2 # SConscript for gdi winsys
3
4 Import('*')
5
6 env = env.Clone()
7
8 env.Append(CPPPATH = [
9 '#src',
10 '#src/gallium/state_trackers/wgl',
11 '#src/gallium/winsys/sw',
12 ])
13
14 env.Append(LIBS = [
15 'gdi32',
16 'user32',
17 'kernel32',
18 'ws2_32',
19 ])
20
21 env.Prepend(LIBS = [
22 mesautil,
23 nir,
24 spirv
25 ])
26
27 sources = ['libgl_gdi.c']
28 drivers = []
29
30 if True:
31 drivers += [softpipe]
32
33 if env['llvm']:
34 env.Append(CPPDEFINES = 'HAVE_LLVMPIPE')
35 drivers += [llvmpipe]
36
37 if env['swr']:
38 env.Append(CPPDEFINES = 'HAVE_SWR')
39 drivers += [swr]
40
41 if env['gcc'] and env['machine'] != 'x86_64':
42 # DEF parser in certain versions of MinGW is busted, as does not behave as
43 # MSVC. mingw-w64 works fine.
44 sources += ['#src/gallium/state_trackers/wgl/opengl32.mingw.def']
45 else:
46 sources += ['#src/gallium/state_trackers/wgl/opengl32.def']
47
48 env['no_import_lib'] = 1
49
50 # when GLES is enabled, gl* and _glapi_* belong to bridge_glapi and
51 # shared_glapi respectively
52 if env['gles']:
53 env.Prepend(LIBPATH = [shared_glapi.dir])
54 glapi = [bridge_glapi, 'libglapi']
55
56 opengl32 = env.SharedLibrary(
57 target ='opengl32',
58 source = sources,
59 LIBS = wgl + ws_gdi + glapi + compiler + mesa + drivers + gallium + glsl + nir + env['LIBS'],
60 )
61
62 env.Alias('opengl32', opengl32)
63 env.Alias('libgl-gdi', opengl32)