mesa/src/gallium/targets/osmesa/SConscript
Brian Paul 6a519a157b gallium/osmesa: link with winsock2 library on Windows
To fix the MSVC build.  The build broke because we started to compile
the ddebug code on Windows after the mtypes.h changes.  Building ddebug
caused us to also use the u_network.c code for the first time.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2018-04-13 19:06:55 -06:00

52 lines
994 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,
glsl,
nir,
spirv,
mesautil,
softpipe
])
env.Append(CPPDEFINES = ['GALLIUM_SOFTPIPE'])
sources = ['target.c']
if env['llvm']:
env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
env.Prepend(LIBS = [llvmpipe])
if env['swr']:
env.Append(CPPDEFINES = 'GALLIUM_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']
# Link with winsock2 library
env.Append(LIBS = ['ws2_32'])
gallium_osmesa = env.SharedLibrary(
target ='osmesa',
source = sources,
LIBS = env['LIBS'],
)
env.Alias('osmesa', gallium_osmesa)