summaryrefslogtreecommitdiff
path: root/progs/SConstruct
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-01-23 14:35:36 +0000
committerJosé Fonseca <jfonseca@vmware.com>2009-01-23 14:35:36 +0000
commit479ea7d87b6d283cd74d345cb618d69a889284d9 (patch)
tree30914b79b70473656b404d2d3700dda609c69688 /progs/SConstruct
parent57d00016cab9afa3e7853d9830044a8ece9541c4 (diff)
progs/trivial: Use glew where needed.
Builds on windows now.
Diffstat (limited to 'progs/SConstruct')
-rw-r--r--progs/SConstruct25
1 files changed, 23 insertions, 2 deletions
diff --git a/progs/SConstruct b/progs/SConstruct
index ac5314fac5..bce48f72ff 100644
--- a/progs/SConstruct
+++ b/progs/SConstruct
@@ -10,9 +10,23 @@ env = Environment(
# Use Mesa's headers and libs
-if 0:
+if 1:
+ build_topdir = 'build'
+ build_subdir = env['platform']
+ if env['machine'] != 'generic':
+ build_subdir += '-' + env['machine']
+ if env['debug']:
+ build_subdir += "-debug"
+ if env['profile']:
+ build_subdir += "-profile"
+ build_dir = os.path.join(build_topdir, build_subdir)
+
+ env.Append(CPPDEFINES = ['GLEW_STATIC'])
env.Append(CPPPATH = ['#../include'])
- env.Append(LIBPATH = ['#../lib'])
+ env.Append(LIBPATH = [
+ '#../' + build_dir + '/glew/',
+ '#../' + build_dir + '/glut/glx',
+ ])
conf = Configure(env)
@@ -32,6 +46,13 @@ if conf.CheckCHeader('GL/glut.h'):
env['GLUT_LIB'] = 'glut'
env['GLUT'] = True
+# GLEW
+env['GLEW'] = False
+if conf.CheckCHeader('GL/glew.h'):
+ env['GLEW_LIB'] = 'glew'
+ env['GLEW'] = True
+ env.Prepend(LIBS = ['glew'])
+
conf.Finish()