diff options
| author | Cody Northrop <cnorthrop@google.com> | 2015-11-30 13:40:50 -0700 |
|---|---|---|
| committer | Jon Ashburn <jon@lunarg.com> | 2015-12-01 15:19:53 -0700 |
| commit | 93778de874c0f66ce3d9d8563d297bcaa4725825 (patch) | |
| tree | 7cf30083e79b8d1da08dd30d741810dee1016f15 | |
| parent | 2afb020a8a38f1dfc3a1fa13063b3a311a8f0e74 (diff) | |
| download | usermoji-93778de874c0f66ce3d9d8563d297bcaa4725825.tar.xz | |
toolchain: Add option to only build glslang
New usage:
update_external_sources.sh -g
or:
update_external_sources.sh --glslang-only
Building LunarGLASS by default takes a long time on systems that don't
need it.
| -rwxr-xr-x | update_external_sources.sh | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/update_external_sources.sh b/update_external_sources.sh index e763f635..4c093f81 100755 --- a/update_external_sources.sh +++ b/update_external_sources.sh @@ -94,15 +94,41 @@ function build_LunarGLASS () { make install } +# Parse options +while [[ $# > 0 ]] +do +option="$1" + +case $option in + # option to allow just building glslang components + -g|--glslang-only) + GLSLANG_ONLY=true + echo "Building glslang only: GLSLANG_ONLY=true" + ;; + *) + echo "Unrecognized option: $option" + exit 1 + ;; +esac +shift +done + if [ ! -d "$BASEDIR/glslang" -o ! -d "$BASEDIR/glslang/.git" -o -d "$BASEDIR/glslang/.svn" ]; then create_glslang fi -if [ ! -d "$BASEDIR/LunarGLASS" -o ! -d "$BASEDIR/LunarGLASS/.git" ]; then - create_LunarGLASS + +if [ ! $GLSLANG_ONLY ]; then + if [ ! -d "$BASEDIR/LunarGLASS" -o ! -d "$BASEDIR/LunarGLASS/.git" ]; then + create_LunarGLASS + fi fi update_glslang -update_LunarGLASS +if [ ! $GLSLANG_ONLY ]; then + update_LunarGLASS +fi build_glslang -build_LunarGLASS +if [ ! $GLSLANG_ONLY ]; then + build_LunarGLASS +fi |
