Separate GLSLANG_WEB (min-size build) and Emscripten options

Allows building non-min-size builds with Emscripten.
Adds ENABLE_GLSLANG_WEB_DEVEL.
Moves the glslang.js files to OSDependent/Web.
Small cleanups and docs update.
This commit is contained in:
Kai Ninomiya 2019-09-17 23:08:45 -07:00
parent be467db7bd
commit 4391924ac5
7 changed files with 70 additions and 62 deletions

View file

@ -0,0 +1,10 @@
add_executable(glslang.js "glslang.js.cpp")
glslang_set_link_args(glslang.js)
target_link_libraries(glslang.js glslang SPIRV)
if(EMSCRIPTEN)
set_target_properties(glslang.js PROPERTIES
OUTPUT_NAME "glslang"
SUFFIX ".js"
LINK_FLAGS "--bind -s EXPORT_NAME=\"glslangModule\"")
em_link_pre_js(glslang.js "${CMAKE_CURRENT_SOURCE_DIR}/glslang.pre.js")
endif(EMSCRIPTEN)