scons: Unbreak mingw cross compilation.
This commit is contained in:
@@ -102,16 +102,16 @@ if env['msvc']:
|
|||||||
env.Prepend(CPPPATH = ['#/src/getopt'])
|
env.Prepend(CPPPATH = ['#/src/getopt'])
|
||||||
env.PrependUnique(LIBS = [getopt])
|
env.PrependUnique(LIBS = [getopt])
|
||||||
|
|
||||||
main_obj = env.StaticObject('main.cpp')
|
|
||||||
|
|
||||||
mesa_objs = env.StaticObject([
|
|
||||||
'#src/mesa/program/hash_table.c',
|
|
||||||
'#src/mesa/program/symbol_table.c',
|
|
||||||
])
|
|
||||||
|
|
||||||
if env['crosscompile'] and env['platform'] != 'embedded':
|
if env['crosscompile'] and env['platform'] != 'embedded':
|
||||||
Import('builtin_glsl_function')
|
Import('builtin_glsl_function')
|
||||||
else:
|
else:
|
||||||
|
main_obj = env.StaticObject('main.cpp')
|
||||||
|
|
||||||
|
mesa_objs = env.StaticObject([
|
||||||
|
'#src/mesa/program/hash_table.c',
|
||||||
|
'#src/mesa/program/symbol_table.c',
|
||||||
|
])
|
||||||
|
|
||||||
builtin_compiler = env.Program(
|
builtin_compiler = env.Program(
|
||||||
target = 'builtin_compiler',
|
target = 'builtin_compiler',
|
||||||
source = main_obj + glsl_sources + ['builtin_stubs.cpp'] + mesa_objs,
|
source = main_obj + glsl_sources + ['builtin_stubs.cpp'] + mesa_objs,
|
||||||
@@ -149,6 +149,11 @@ env.Depends(glsl, glsl_parser)
|
|||||||
|
|
||||||
Export('glsl')
|
Export('glsl')
|
||||||
|
|
||||||
|
# Skip building these programs as they will cause SCons error "Two environments
|
||||||
|
# with different actions were specified for the same target"
|
||||||
|
if env['crosscompile'] or env['platform'] == 'embedded':
|
||||||
|
Return()
|
||||||
|
|
||||||
env = env.Clone()
|
env = env.Clone()
|
||||||
|
|
||||||
if env['platform'] == 'windows':
|
if env['platform'] == 'windows':
|
||||||
|
Reference in New Issue
Block a user