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

Import('*')

env = env.Clone()

env.Append(CPPPATH = [
    '#/src/egl/main',
    '#/src/gallium/winsys',
    '#/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/loader',
            '#/src/gbm/main',
            '#/src/gallium/state_trackers/gbm',
        ])
        env.Prepend(LIBS = [
            libloader
        ])
        sources.append(env.ParseSourceList('Makefile.sources', 'drm_FILES'))

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