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.
This commit is contained in:
@@ -16,6 +16,12 @@ env.Append(CPPDEFINES = ['USE_XSHM'])
|
||||
|
||||
env.Prepend(LIBS = env['X11_LIBS'])
|
||||
|
||||
# when GLES is enabled, gl* and _glapi_* belong to bridge_glapi and
|
||||
# shared_glapi respectively
|
||||
if env['gles']:
|
||||
env.Prepend(LIBPATH = [shared_glapi.dir])
|
||||
glapi = [bridge_glapi, 'glapi']
|
||||
|
||||
env.Prepend(LIBS = [
|
||||
st_xlib,
|
||||
ws_xlib,
|
||||
|
Reference in New Issue
Block a user