diff options
author | Chia-I Wu <[email protected]> | 2011-01-14 17:50:29 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2011-01-22 11:59:05 +0800 |
commit | bb770af3a59e5935c108c05ee45490fc5668d4a3 (patch) | |
tree | 206b869b2a2d740570349b1e4412cf51c172e56b /SConstruct | |
parent | 3f04314ae2659748c8cf73ec649a035bc9e01597 (diff) |
scons: Add support for GLES.
GLES can be enabled by running scons with
$ scons gles=yes
When gles=yes is given, the build is changed in three ways. First,
libmesa.a will be built with FEATURE_ES1 and FEATURE_ES2. This makes
DRI drivers and libEGL support and advertise GLES support. Second, GLES
libraries will be created. They are libGLESv1_CM, libGLESv2, and
libglapi. Last, libGL or opengl32 will link to libglapi. This change
is required as _glapi_* will be declared as __declspec(dllimport) in
libmesa.a on windows. libmesa.a expects those symbols to be defined in
another DLL. Due to this change to GL, GLES support is marked
experimental.
Note that GLES requires libxml2-python to generate some of its sources.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index 368ad83edf3..a2c20471f7a 100644 --- a/SConstruct +++ b/SConstruct @@ -56,6 +56,12 @@ else: Help(opts.GenerateHelpText(env)) +# fail early for a common error on windows +if env['gles']: + try: + import libxml2 + except ImportError: + raise SCons.Errors.UserError, "GLES requires libxml2-python to build" ####################################################################### # Environment setup |