package/sdl2: enable OpenGL ES support
authorRomain Naour <romain.naour@gmail.com>
Sun, 26 Feb 2017 16:48:54 +0000 (17:48 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 26 Feb 2017 20:05:42 +0000 (21:05 +0100)
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/sdl2/Config.in
package/sdl2/sdl2.mk

index 6345133c42d96fa66394e82f162f2a4d1646356d..a2971edc899da717bff2a86ef348336398a7807c 100644 (file)
@@ -40,6 +40,13 @@ comment "OpenGL support needs X11 and an OpenGL provider"
        depends on BR2_USE_MMU
        depends on !BR2_PACKAGE_HAS_LIBGL || !BR2_PACKAGE_XORG7
 
+config BR2_PACKAGE_SDL2_OPENGLES
+       bool "OpenGL ES"
+       depends on BR2_PACKAGE_HAS_LIBGLES
+
+comment "OpenGL ES support needs an OpenGL ES provider"
+       depends on !BR2_PACKAGE_HAS_LIBGLES
+
 endif
 
 comment "sdl2 needs a toolchain w/ dynamic library"
index 3f210f8d6038dace9c9b4813449239be9da33f89..d2ee50dc1d7ed5f12eef84171e9c93e5a9f34b52 100644 (file)
@@ -18,7 +18,6 @@ SDL2_CONF_OPTS += \
        --disable-esd \
        --disable-dbus \
        --disable-pulseaudio \
-       --disable-video-opengles \
        --disable-video-wayland
 
 # We must enable static build to get compilation successful.
@@ -105,6 +104,13 @@ else
 SDL2_CONF_OPTS += --disable-video-opengl
 endif
 
+ifeq ($(BR2_PACKAGE_SDL2_OPENGLES),y)
+SDL2_CONF_OPTS += --enable-video-opengles
+SDL2_DEPENDENCIES += libgles
+else
+SDL2_CONF_OPTS += --disable-video-opengles
+endif
+
 ifeq ($(BR2_PACKAGE_TSLIB),y)
 SDL2_DEPENDENCIES += tslib
 SDL2_CONF_OPTS += --enable-input-tslib