scons: builtin_glsl_function on windows needs bundled getopt.
This commit is contained in:
11
SConstruct
11
SConstruct
@@ -121,8 +121,6 @@ if env['platform'] in ('posix', 'linux', 'freebsd', 'darwin'):
|
|||||||
# for debugging
|
# for debugging
|
||||||
#print env.Dump()
|
#print env.Dump()
|
||||||
|
|
||||||
Export('env')
|
|
||||||
|
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
# Invoke host SConscripts
|
# Invoke host SConscripts
|
||||||
@@ -149,13 +147,18 @@ if env['crosscompile'] and env['platform'] != 'embedded':
|
|||||||
|
|
||||||
host_env.Tool('gallium')
|
host_env.Tool('gallium')
|
||||||
|
|
||||||
|
host_env['hostonly'] = True
|
||||||
|
assert host_env['crosscompile'] == False
|
||||||
|
|
||||||
|
Export(env = host_env)
|
||||||
|
|
||||||
SConscript(
|
SConscript(
|
||||||
'src/glsl/SConscript',
|
'src/SConscript',
|
||||||
variant_dir = host_env['build_dir'],
|
variant_dir = host_env['build_dir'],
|
||||||
duplicate = 0, # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
|
duplicate = 0, # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
|
||||||
exports={'env':host_env},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Export('env')
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
# Invoke SConscripts
|
# Invoke SConscripts
|
||||||
|
@@ -208,6 +208,7 @@ def generate(env):
|
|||||||
env['crosscompile'] = platform != host_platform
|
env['crosscompile'] = platform != host_platform
|
||||||
if machine == 'x86_64' and host_machine != 'x86_64':
|
if machine == 'x86_64' and host_machine != 'x86_64':
|
||||||
env['crosscompile'] = True
|
env['crosscompile'] = True
|
||||||
|
env['hostonly'] = False
|
||||||
|
|
||||||
# Backwards compatability with the debug= profile= options
|
# Backwards compatability with the debug= profile= options
|
||||||
if env['build'] == 'debug':
|
if env['build'] == 'debug':
|
||||||
|
@@ -1,9 +1,17 @@
|
|||||||
Import('*')
|
Import('*')
|
||||||
|
|
||||||
|
|
||||||
if env['platform'] == 'windows':
|
if env['platform'] == 'windows':
|
||||||
SConscript('getopt/SConscript')
|
SConscript('getopt/SConscript')
|
||||||
|
|
||||||
SConscript('glsl/SConscript')
|
SConscript('glsl/SConscript')
|
||||||
|
|
||||||
|
if env['hostonly']:
|
||||||
|
# We are just compiling the things necessary on the host for cross
|
||||||
|
# compilation
|
||||||
|
Return()
|
||||||
|
|
||||||
|
|
||||||
# When env['gles'] is set, the targets defined in mapi/glapi/SConscript are not
|
# When env['gles'] is set, the targets defined in mapi/glapi/SConscript are not
|
||||||
# used. libgl-xlib and libgl-gdi adapt themselves to use the targets defined
|
# used. libgl-xlib and libgl-gdi adapt themselves to use the targets defined
|
||||||
# in mapi/glapi-shared/SConscript. mesa/SConscript also adapts itself to
|
# in mapi/glapi-shared/SConscript. mesa/SConscript also adapts itself to
|
||||||
|
@@ -82,7 +82,9 @@ sources = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
if not env['crosscompile'] or env['platform'] == 'embedded':
|
if env['crosscompile'] and env['platform'] != 'embedded':
|
||||||
|
Import('builtin_glsl_function')
|
||||||
|
else:
|
||||||
if env['msvc']:
|
if env['msvc']:
|
||||||
env.Prepend(CPPPATH = ['#/src/getopt'])
|
env.Prepend(CPPPATH = ['#/src/getopt'])
|
||||||
env.PrependUnique(LIBS = [getopt])
|
env.PrependUnique(LIBS = [getopt])
|
||||||
@@ -105,6 +107,10 @@ if not env['crosscompile'] or env['platform'] == 'embedded':
|
|||||||
|
|
||||||
Export('builtin_glsl_function')
|
Export('builtin_glsl_function')
|
||||||
|
|
||||||
|
if env['hostonly']:
|
||||||
|
Return()
|
||||||
|
|
||||||
|
|
||||||
sources += builtin_glsl_function
|
sources += builtin_glsl_function
|
||||||
|
|
||||||
glsl = env.ConvenienceLibrary(
|
glsl = env.ConvenienceLibrary(
|
||||||
|
Reference in New Issue
Block a user