diff options
author | marha <marha@users.sourceforge.net> | 2009-12-22 18:41:22 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-12-22 18:41:22 +0000 |
commit | ad01e57c327538a3d75fb24ad18b54b0fceb21cc (patch) | |
tree | 72af2496df52b8ccfbf18d50b7378b63485fa62d /mesalib/progs/SConstruct | |
parent | 3b79162ea5c5be078326f2e0ea85b0f84c02f166 (diff) | |
parent | 1e723abc27bdc2ad675bce79467a7308c2966861 (diff) | |
download | vcxsrv-ad01e57c327538a3d75fb24ad18b54b0fceb21cc.tar.gz vcxsrv-ad01e57c327538a3d75fb24ad18b54b0fceb21cc.tar.bz2 vcxsrv-ad01e57c327538a3d75fb24ad18b54b0fceb21cc.zip |
svn merge ^/branches/released
Diffstat (limited to 'mesalib/progs/SConstruct')
-rw-r--r-- | mesalib/progs/SConstruct | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/mesalib/progs/SConstruct b/mesalib/progs/SConstruct new file mode 100644 index 000000000..4d268cc6d --- /dev/null +++ b/mesalib/progs/SConstruct @@ -0,0 +1,65 @@ +import os +import os.path +import sys + +env = Environment( + tools = ['generic'], + toolpath = ['../scons'], + ENV = os.environ, +) + + +# Use Mesa's headers and libs +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 = [ + '#../' + build_dir + '/glew/', + '#../' + build_dir + '/glut/glx', + ]) + + +conf = Configure(env) + +# OpenGL +if env['platform'] == 'windows': + env.Prepend(LIBS = ['glu32', 'opengl32']) +else: + env.Prepend(LIBS = ['GLU', 'GL']) + +# Glut +env['GLUT'] = False +if conf.CheckCHeader('GL/glut.h'): + if env['platform'] == 'windows': + env['GLUT_LIB'] = 'glut32' + else: + 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() + + +Export('env') + +SConscript( + 'SConscript', + build_dir = env['build'], + duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html +) |