bd0ee02d20219efb34917bd58f65648351b6c70a
[mesa.git] / src / gallium / state_trackers / egl / SConscript
1 #######################################################################
2 # SConscript for egl state_tracker
3
4 Import('*')
5
6 env = env.Clone()
7
8 env.Append(CPPPATH = [
9 '#/src/egl/main',
10 '#/src/gallium/winsys/sw',
11 '.',
12 ])
13
14 sources = env.ParseSourceList('Makefile.sources', 'common_FILES')
15
16 if env['platform'] == 'windows':
17 env.Append(CPPDEFINES = ['HAVE_GDI_BACKEND'])
18 sources.append(env.ParseSourceList('Makefile.sources', 'gdi_FILES'))
19 else:
20 if env['drm']:
21 env.PkgUseModules('DRM')
22 if env['x11']:
23 env.Append(CPPDEFINES = ['HAVE_X11_BACKEND'])
24 env.Prepend(CPPPATH = [
25 '#/src/glx',
26 '#/src/mapi',
27 ])
28 sources.append(env.ParseSourceList('Makefile.sources', 'x11_FILES'))
29 if env['drm']:
30 env.Append(CPPDEFINES = ['GLX_DIRECT_RENDERING'])
31 sources.append(env.ParseSourceList('Makefile.sources', 'x11_drm_FILES'))
32 if env['drm'] and False:
33 # XXX: Disabled as it depends on gbm, which is not yet built with scons
34 env.Append(CPPDEFINES = ['HAVE_DRM_BACKEND'])
35 env.Append(CPPPATH = [
36 '#/src/gbm/main',
37 '#/src/gallium/state_trackers/gbm',
38 ])
39 sources.append(env.ParseSourceList('Makefile.sources', 'drm_FILES'))
40
41 st_egl = env.ConvenienceLibrary(
42 target = 'st_egl',
43 source = sources,
44 )
45 Export('st_egl')