summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/egl/SConscript
blob: bd0ee02d20219efb34917bd58f65648351b6c70a (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
#######################################################################
# SConscript for egl state_tracker

Import('*')

env = env.Clone()

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

sources = env.ParseSourceList('Makefile.sources', 'common_FILES')

if env['platform'] == 'windows':
    env.Append(CPPDEFINES = ['HAVE_GDI_BACKEND'])
    sources.append(env.ParseSourceList('Makefile.sources', 'gdi_FILES'))
else:
    if env['drm']:
        env.PkgUseModules('DRM')
    if env['x11']:
        env.Append(CPPDEFINES = ['HAVE_X11_BACKEND'])
        env.Prepend(CPPPATH = [
            '#/src/glx',
            '#/src/mapi',
        ])
        sources.append(env.ParseSourceList('Makefile.sources', 'x11_FILES'))
        if env['drm']:
            env.Append(CPPDEFINES = ['GLX_DIRECT_RENDERING'])
            sources.append(env.ParseSourceList('Makefile.sources', 'x11_drm_FILES'))
    if env['drm'] and False:
        # XXX: Disabled as it depends on gbm, which is not yet built with scons
        env.Append(CPPDEFINES = ['HAVE_DRM_BACKEND'])
        env.Append(CPPPATH = [
            '#/src/gbm/main',
            '#/src/gallium/state_trackers/gbm',
        ])
        sources.append(env.ParseSourceList('Makefile.sources', 'drm_FILES'))

st_egl = env.ConvenienceLibrary(
    target = 'st_egl',
    source = sources,
)
Export('st_egl')