cmake: add ability to use WebGL 2 with Emscripten

This commit is contained in:
Sebastian Krzyszkowiak 2018-07-06 04:04:05 +02:00
parent ce76a53939
commit a4bd7fbb0f

View file

@ -62,6 +62,10 @@ if (NOT LIBSUPERDERPY_CONFIG_INCLUDED)
if(EMSCRIPTEN)
set(CMAKE_EXECUTABLE_SUFFIX ".bc")
set(EMSCRIPTEN_USE_FLAGS -s USE_SDL=2 -s USE_FREETYPE=1 -s USE_LIBPNG=1 -s USE_ZLIB=1 -s USE_OGG=1 -s USE_VORBIS=1 -s FULL_ES2=1 -s WASM=0)
set(LIBSUPERDERPY_USE_WEBGL2 "no" CACHE STRING "Use WebGL 2 context")
if(LIBSUPERDERPY_USE_WEBGL2)
set(EMSCRIPTEN_USE_FLAGS ${EMSCRIPTEN_USE_FLAGS} -s USE_WEBGL2=1)
endif(LIBSUPERDERPY_USE_WEBGL2)
# FIXME
set(ALLEGRO5_INCLUDE_DIR ${ALLEGRO_INCLUDE_PATH})
set(ALLEGRO5_ACODEC_INCLUDE_DIR ${ALLEGRO_INCLUDE_PATH})