Mesa (master): glsl: Make builtin_compiler build on Windows with MSVC.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Wed Jan 12 16:59:40 UTC 2011
Module: Mesa
Branch: master
Commit: 416ca901389b049eaaf2edbce631396772dbeb20
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=416ca901389b049eaaf2edbce631396772dbeb20
Author: José Fonseca <jfonseca at vmware.com>
Date: Wed Jan 12 16:58:37 2011 +0000
glsl: Make builtin_compiler build on Windows with MSVC.
---
src/glsl/SConscript | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/src/glsl/SConscript b/src/glsl/SConscript
index 577aedf..a22fceb 100644
--- a/src/glsl/SConscript
+++ b/src/glsl/SConscript
@@ -84,7 +84,11 @@ if env['msvc']:
env.Prepend(CPPPATH = ['#/src/getopt'])
env.PrependUnique(LIBS = [getopt])
-env.Prepend(LIBS = ['talloc'])
+if env['platform'] == 'windows':
+ env.Prepend(LIBS = [talloc])
+else:
+ env.Prepend(LIBS = ['talloc'])
+
env.Append(CPPPATH = ['#/src/glsl'])
builtin_compiler = env.Program(
@@ -103,6 +107,14 @@ env.CodeGenerate(
env.Depends('builtin_function.cpp', ['builtins/tools/generate_builtins.py', 'builtins/tools/texture_builtins.py'] + Glob('builtins/ir/*'))
+if env['msvc']:
+ # There is no LD_LIBRARY_PATH equivalent on Windows. We need to ensure
+ # talloc.dll is on the same dir as builtin_function.
+ talloc_dll_src = talloc.dir.File('talloc.dll')
+ talloc_dll_dst = builtin_compiler[0].dir.File('talloc.dll')
+ talloc_dll = env.Command(talloc_dll_dst, talloc_dll_src, Copy(talloc_dll_dst, talloc_dll_src))
+ env.Depends('builtin_function.cpp', talloc_dll)
+
glsl = env.ConvenienceLibrary(
target = 'glsl',
source = sources + [ 'builtin_function.cpp' ],
More information about the mesa-commit
mailing list