Split "is emscripten" config from "enable glslang.js"

This should enable glslang to be used as a dependency of other projects
that target WebAssembly, instead of assuming "EMSCRIPTEN" => "Want
glslang.js".
This commit is contained in:
Kai Ninomiya
2020-02-06 13:36:52 -08:00
parent b82ed734e7
commit 5166bc1859
5 changed files with 75 additions and 61 deletions

View File

@@ -182,7 +182,8 @@ Use the steps in [Build Steps](#build-steps), with the following notes/exception
+ execute `updateGrammar web` from the glslang subdirectory
(or if using your own scripts, `m4` needs a `-DGLSLANG_WEB` argument)
+ set `-DENABLE_HLSL=OFF -DBUILD_TESTING=OFF -DENABLE_OPT=OFF -DINSTALL_GTEST=OFF`
+ turn on `-DENABLE_GLSLANG_WEB=ON`
+ turn on `-DENABLE_GLSLANG_JS=ON`
+ optionally, for a minimum-size binary, turn on `-DENABLE_GLSLANG_WEBMIN=ON`
+ optionally, for GLSL compilation error messages, turn on `-DENABLE_GLSLANG_WEB_DEVEL=ON`
* `emsdk` needs to be present in your executable search path, *PATH* for
Bash-like environments