diff options
| author | Karl Schultz <karl@lunarg.com> | 2016-09-27 18:38:02 -0600 |
|---|---|---|
| committer | Karl Schultz <karl@lunarg.com> | 2016-09-28 18:12:19 -0600 |
| commit | c4a4553a0eaf14bbddb8bac450543df3d98e2bc0 (patch) | |
| tree | b44875c92e6297567be922171c3ffde344ada593 /update_external_sources.sh | |
| parent | 2f818fb3b0f1de0b43948b20b1e07d0d52710def (diff) | |
| download | usermoji-c4a4553a0eaf14bbddb8bac450543df3d98e2bc0.tar.xz | |
build: gh27 Allow builds in paths with spaces
Add quotes around shell var expansions in the update_external_sources scripts.
For Windows, remove the cmake directives to add a linker option for the DEF
files. These were redundant with the DEF files getting added via the
cmake add_library() directive. They were also causing difficult-to-fix
problems with paths that have spaces in them.
Change-Id: I741bac31bbf27deae59031b6aa916c6ab48383a6
Diffstat (limited to 'update_external_sources.sh')
| -rwxr-xr-x | update_external_sources.sh | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/update_external_sources.sh b/update_external_sources.sh index 780d8496..6f87903a 100755 --- a/update_external_sources.sh +++ b/update_external_sources.sh @@ -3,64 +3,64 @@ set -e -GLSLANG_REVISION=$(cat $PWD/glslang_revision) -SPIRV_TOOLS_REVISION=$(cat $PWD/spirv-tools_revision) -SPIRV_HEADERS_REVISION=$(cat $PWD/spirv-headers_revision) -echo "GLSLANG_REVISION=$GLSLANG_REVISION" -echo "SPIRV_TOOLS_REVISION=$SPIRV_TOOLS_REVISION" -echo "SPIRV_HEADERS_REVISION=$SPIRV_HEADERS_REVISION" +GLSLANG_REVISION=$(cat "${PWD}"/glslang_revision) +SPIRV_TOOLS_REVISION=$(cat "${PWD}"/spirv-tools_revision) +SPIRV_HEADERS_REVISION=$(cat "${PWD}"/spirv-headers_revision) +echo "GLSLANG_REVISION=${GLSLANG_REVISION}" +echo "SPIRV_TOOLS_REVISION=${SPIRV_TOOLS_REVISION}" +echo "SPIRV_HEADERS_REVISION=${SPIRV_HEADERS_REVISION}" BUILDDIR=$PWD BASEDIR=$BUILDDIR/external function create_glslang () { - rm -rf $BASEDIR/glslang - echo "Creating local glslang repository ($BASEDIR/glslang)." - mkdir -p $BASEDIR/glslang - cd $BASEDIR/glslang + rm -rf "${BASEDIR}"/glslang + echo "Creating local glslang repository (${BASEDIR}/glslang)." + mkdir -p "${BASEDIR}"/glslang + cd "${BASEDIR}"/glslang git clone https://github.com/KhronosGroup/glslang.git . - git checkout $GLSLANG_REVISION + git checkout ${GLSLANG_REVISION} } function update_glslang () { - echo "Updating $BASEDIR/glslang" - cd $BASEDIR/glslang + echo "Updating ${BASEDIR}/glslang" + cd "${BASEDIR}"/glslang git fetch --all - git checkout --force $GLSLANG_REVISION + git checkout --force ${GLSLANG_REVISION} } function create_spirv-tools () { - rm -rf $BASEDIR/spirv-tools - echo "Creating local spirv-tools repository ($BASEDIR/spirv-tools)." - mkdir -p $BASEDIR/spirv-tools - cd $BASEDIR/spirv-tools + rm -rf "${BASEDIR}"/spirv-tools + echo "Creating local spirv-tools repository (${BASEDIR}/spirv-tools)." + mkdir -p "${BASEDIR}"/spirv-tools + cd "${BASEDIR}"/spirv-tools git clone https://github.com/KhronosGroup/SPIRV-Tools.git . - git checkout $SPIRV_TOOLS_REVISION - mkdir -p $BASEDIR/spirv-tools/external/spirv-headers - cd $BASEDIR/spirv-tools/external/spirv-headers + git checkout ${SPIRV_TOOLS_REVISION} + mkdir -p "${BASEDIR}"/spirv-tools/external/spirv-headers + cd "${BASEDIR}"/spirv-tools/external/spirv-headers git clone https://github.com/KhronosGroup/SPIRV-Headers . - git checkout $SPIRV_HEADERS_REVISION + git checkout ${SPIRV_HEADERS_REVISION} } function update_spirv-tools () { - echo "Updating $BASEDIR/spirv-tools" - cd $BASEDIR/spirv-tools + echo "Updating ${BASEDIR}/spirv-tools" + cd "${BASEDIR}"/spirv-tools git fetch --all - git checkout $SPIRV_TOOLS_REVISION - if [ ! -d "$BASEDIR/spirv-tools/external/spirv-headers" -o ! -d "$BASEDIR/spirv-tools/external/spirv-headers/.git" ]; then - mkdir -p $BASEDIR/spirv-tools/external/spirv-headers - cd $BASEDIR/spirv-tools/external/spirv-headers + git checkout ${SPIRV_TOOLS_REVISION} + if [ ! -d "${BASEDIR}/spirv-tools/external/spirv-headers" -o ! -d "${BASEDIR}/spirv-tools/external/spirv-headers/.git" ]; then + mkdir -p "${BASEDIR}"/spirv-tools/external/spirv-headers + cd "${BASEDIR}"/spirv-tools/external/spirv-headers git clone https://github.com/KhronosGroup/SPIRV-Headers . else - cd $BASEDIR/spirv-tools/external/spirv-headers + cd "${BASEDIR}"/spirv-tools/external/spirv-headers git fetch --all fi - git checkout $SPIRV_HEADERS_REVISION + git checkout ${SPIRV_HEADERS_REVISION} } function build_glslang () { - echo "Building $BASEDIR/glslang" - cd $BASEDIR/glslang + echo "Building ${BASEDIR}/glslang" + cd "${BASEDIR}"/glslang mkdir -p build cd build cmake -D CMAKE_BUILD_TYPE=Release .. @@ -69,8 +69,8 @@ function build_glslang () { } function build_spirv-tools () { - echo "Building $BASEDIR/spirv-tools" - cd $BASEDIR/spirv-tools + echo "Building ${BASEDIR}/spirv-tools" + cd "${BASEDIR}"/spirv-tools mkdir -p build cd build cmake -D CMAKE_BUILD_TYPE=Release .. @@ -115,8 +115,8 @@ else done fi -if [ $INCLUDE_GLSLANG == "true" ]; then - if [ ! -d "$BASEDIR/glslang" -o ! -d "$BASEDIR/glslang/.git" -o -d "$BASEDIR/glslang/.svn" ]; then +if [ ${INCLUDE_GLSLANG} == "true" ]; then + if [ ! -d "${BASEDIR}/glslang" -o ! -d "${BASEDIR}/glslang/.git" -o -d "${BASEDIR}/glslang/.svn" ]; then create_glslang fi update_glslang @@ -124,8 +124,8 @@ if [ $INCLUDE_GLSLANG == "true" ]; then fi -if [ $INCLUDE_SPIRV_TOOLS == "true" ]; then - if [ ! -d "$BASEDIR/spirv-tools" -o ! -d "$BASEDIR/spirv-tools/.git" ]; then +if [ ${INCLUDE_SPIRV_TOOLS} == "true" ]; then + if [ ! -d "${BASEDIR}/spirv-tools" -o ! -d "${BASEDIR}/spirv-tools/.git" ]; then create_spirv-tools fi update_spirv-tools |
