scons: Gracefully handle pkg-config errors with libdrm_radeon.
[mesa.git] / src / gallium / winsys / r600 / drm / SConscript
1 Import('*')
2
3 env = env.Clone()
4
5 r600_sources = [
6 'bof.c',
7 'evergreen_hw_context.c',
8 'radeon_bo.c',
9 'radeon_pciid.c',
10 'r600_bo.c',
11 'r600_drm.c',
12 'r600_hw_context.c',
13 'r600_bomgr.c',
14 ]
15
16 try:
17 env.ParseConfig('pkg-config --cflags libdrm_radeon')
18 except OSError:
19 print 'warning: not building r600g'
20 Return()
21
22 env.Append(CPPPATH = '#/src/gallium/drivers/r600')
23
24 r600winsys = env.ConvenienceLibrary(
25 target ='r600winsys',
26 source = r600_sources,
27 )
28
29 Export('r600winsys')