diff options
author | José Fonseca <[email protected]> | 2009-12-10 16:29:04 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-12-10 16:30:08 +0000 |
commit | 491f384c3958067e6c4c994041f5d8d413b806bc (patch) | |
tree | 761cddddb7c577277b626449aca7a2bef65e1d94 /src/mesa | |
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 'src/mesa')
-rw-r--r-- | src/mesa/shader/slang/library/SConscript | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/library/SConscript b/src/mesa/shader/slang/library/SConscript index 8b3fd03b6bc..ef131146be5 100644 --- a/src/mesa/shader/slang/library/SConscript +++ b/src/mesa/shader/slang/library/SConscript @@ -5,13 +5,21 @@ Import('*') env = env.Clone() +# See also http://www.scons.org/wiki/UsingCodeGenerators + +def glsl_compile_emitter(target, source, env): + env.Depends(target, glsl_compile) + return (target, source) + bld_frag = Builder( action = glsl_compile[0].abspath + ' fragment $SOURCE $TARGET', + emitter = glsl_compile_emitter, suffix = '.gc', src_suffix = '_gc.h') bld_vert = Builder( action = glsl_compile[0].abspath + ' vertex $SOURCE $TARGET', + emitter = glsl_compile_emitter, suffix = '.gc', src_suffix = '_gc.h') |