summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/libgl-gdi/SConscript
blob: b5ba0fabcd06f536e9514ee7f6fc8893865b7279 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#######################################################################
# SConscript for gdi winsys

Import('*')

env = env.Clone()

env.Append(CPPPATH = [
    '#src',
    '#src/gallium/state_trackers/wgl',
    '#src/gallium/winsys/sw',
])

env.Append(LIBS = [
    'gdi32',
    'user32',
    'kernel32',
    'ws2_32',
])

env.Prepend(LIBS = [
    mesautil,
    nir,
    spirv
])

sources = ['libgl_gdi.c']
drivers = []

if True:
    drivers += [softpipe]

if env['llvm']:
    env.Append(CPPDEFINES = 'HAVE_LLVMPIPE')
    drivers += [llvmpipe]

    if env['swr']:
        env.Append(CPPDEFINES = 'HAVE_SWR')
        drivers += [swr]

if env['gcc'] and env['machine'] != 'x86_64':
    # DEF parser in certain versions of MinGW is busted, as does not behave as
    # MSVC.  mingw-w64 works fine.
    sources += ['#src/gallium/state_trackers/wgl/opengl32.mingw.def']
else:
    sources += ['#src/gallium/state_trackers/wgl/opengl32.def']

drivers += [trace, rbug]

env['no_import_lib'] = 1

# when GLES is enabled, gl* and _glapi_* belong to bridge_glapi and
# shared_glapi respectively
if env['gles']:
    env.Prepend(LIBPATH = [shared_glapi.dir])
    glapi = [bridge_glapi, 'libglapi']

opengl32 = env.SharedLibrary(
    target ='opengl32',
    source = sources,
    LIBS = wgl + ws_gdi + glapi + compiler + mesa + drivers + gallium + glsl + nir + env['LIBS'],
)

env.Alias('opengl32', opengl32)
env.Alias('libgl-gdi', opengl32)