make glslang.js easy to use

This commit is contained in:
Kai Ninomiya 2019-07-25 21:34:15 -07:00
parent a91561d583
commit b16a4bc45e
3 changed files with 78 additions and 25 deletions

View file

@ -131,6 +131,7 @@ if(ENABLE_GLSLANG_WEB)
set_target_properties(glslang.js PROPERTIES
OUTPUT_NAME "glslang"
SUFFIX ".js"
LINK_FLAGS "--bind")
LINK_FLAGS "--bind -s EXPORT_NAME=\"glslangModule\"")
em_link_pre_js(glslang.js ${CMAKE_CURRENT_SOURCE_DIR}/glslang.pre.js)
endif(EMSCRIPTEN)
endif(ENABLE_GLSLANG_WEB)