diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-12-10 16:29:04 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-12-10 16:30:08 +0000 |
commit | 491f384c3958067e6c4c994041f5d8d413b806bc (patch) | |
tree | 761cddddb7c577277b626449aca7a2bef65e1d94 /SConstruct | |
parent | 289eab5389c0f0f3f85f872b2ba440f5e8416a50 (diff) |
scons: Get GLSL code building correctly when cross compiling.
This is quite messy. GLSL code has to be built twice: one for the
host OS, another for the target OS.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index e9baab0947..e71fcd673a 100644 --- a/SConstruct +++ b/SConstruct @@ -160,6 +160,25 @@ Export('env') # TODO: Build several variants at the same time? # http://www.scons.org/wiki/SimultaneousVariantBuilds +if env['platform'] != common.default_platform: + # GLSL code has to be built twice -- one for the host OS, another for the target OS... + + host_env = Environment( + # options are ignored + # default tool is used + toolpath = ['#scons'], + ENV = os.environ, + ) + + host_env['platform'] = common.default_platform + + SConscript( + 'src/glsl/SConscript', + variant_dir = env['build'] + '/host', + duplicate = 0, # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html + exports={'env':host_env}, + ) + SConscript( 'src/SConscript', variant_dir = env['build'], |