mesa/src/gallium/targets/osmesa/SConscript
George Kyriazis 9aae167e94 gallium: Add support for SWR compilation
Include swr library and include -DHAVE_SWR in the compile line.

v3: split to a separate commit

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-11-21 12:44:47 -06:00

49 lines
940 B
Python

Import('*')
env = env.Clone()
env.Prepend(CPPPATH = [
'#src/mapi',
'#src/mesa',
#Dir('../../../mapi'), # src/mapi build path for python-generated GL API files/headers
])
env.Prepend(LIBS = [
st_osmesa,
ws_null,
glapi,
compiler,
mesa,
gallium,
trace,
glsl,
nir,
mesautil,
softpipe
])
env.Append(CPPDEFINES = ['GALLIUM_TRACE', 'GALLIUM_SOFTPIPE'])
sources = ['target.c']
if env['llvm']:
env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
env.Prepend(LIBS = [llvmpipe])
if env['swr']:
env.Append(CPPDEFINES = 'HAVE_SWR')
env.Prepend(LIBS = [swr])
if env['platform'] == 'windows':
if env['gcc'] and env['machine'] != 'x86_64':
sources += ['osmesa.mingw.def']
else:
sources += ['osmesa.def']
gallium_osmesa = env.SharedLibrary(
target ='osmesa',
source = sources,
LIBS = env['LIBS'],
)
env.Alias('osmesa', gallium_osmesa)