scons: Add support for GLES.
[mesa.git] / src / gallium / targets / egl-static / SConscript
index 381ef4e862de53fdeff48503f088f88a3c8d4adf..c978934a0c8b577bfa7b95e8f0125ee793d2edc2 100644 (file)
@@ -58,10 +58,18 @@ if env['platform'] == 'windows':
     env.Prepend(LIBS = [
         ws_gdi,
     ])
-else:
-    # OpenGL
-    env.Append(CPPDEFINES = ['FEATURE_GL=1'])
-    env.Prepend(LIBS = ['GL', 'talloc', glsl, mesa])
+
+# OpenGL ES and OpenGL
+if env['gles']:
+    env.Append(CPPDEFINES = [
+        'FEATURE_GL=1',
+        'FEATURE_ES1=1',
+        'FEATURE_ES2=1'
+    ])
+    env.Prepend(LIBPATH = [shared_glapi.dir])
+    # manually add LIBPREFIX on windows
+    glapi_name = 'glapi' if env['platform'] != 'windows' else 'libglapi'
+    env.Prepend(LIBS = [glapi_name, talloc, glsl, mesa])
 
 # OpenVG
 if True: