diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2018-04-11 12:22:03 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2018-05-11 20:11:02 -0600 |
| commit | 7d8a24a8af0768b38a8dbb7bfc75357198909408 (patch) | |
| tree | 587bef4aebb7c2594a503018940e351d7013e801 | |
| parent | a7c036f36a2b39013f4dff81285f95a2914dc67e (diff) | |
| download | usermoji-7d8a24a8af0768b38a8dbb7bfc75357198909408.tar.xz | |
repo: Delete glslang files
Change-Id: I42e66cf9dc4a4db7a86bc2f29086fad532b9f629
| -rw-r--r-- | external_revisions/glslang_giturl | 1 | ||||
| -rw-r--r-- | external_revisions/glslang_revision | 1 | ||||
| -rwxr-xr-x | scripts/check_toolchain_revisions.sh | 57 | ||||
| -rw-r--r-- | scripts/external_revision_generator.py | 114 | ||||
| -rw-r--r-- | update_external_sources.bat | 399 | ||||
| -rwxr-xr-x | update_external_sources.sh | 174 |
6 files changed, 0 insertions, 746 deletions
diff --git a/external_revisions/glslang_giturl b/external_revisions/glslang_giturl deleted file mode 100644 index d6610008..00000000 --- a/external_revisions/glslang_giturl +++ /dev/null @@ -1 +0,0 @@ -https://github.com/KhronosGroup/glslang.git diff --git a/external_revisions/glslang_revision b/external_revisions/glslang_revision deleted file mode 100644 index 1e018a55..00000000 --- a/external_revisions/glslang_revision +++ /dev/null @@ -1 +0,0 @@ -3bb4c48cd95892a5cfcd63df20fcc47fd51c97a0 diff --git a/scripts/check_toolchain_revisions.sh b/scripts/check_toolchain_revisions.sh deleted file mode 100755 index 10835290..00000000 --- a/scripts/check_toolchain_revisions.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/bash - -set -e - -# If any tracked revision no longer matches the local revision, blast the extenal toolchain directories - -function check_revision() -{ - echo Checking current revision for $1 in $2 - if [ -d $2/.git ]; then - current_rev=$(git --git-dir=$2/.git rev-parse HEAD); - fi - echo current_rev for $1 is $current_rev; - tracked_rev=$(cat $3); - echo tracked_rev for $1 is $tracked_rev; - if [ "$current_rev" != "$tracked_rev" ]; then - echo Revisions for $1 do not match.; - if [ -d external ]; then - echo Removing current desktop toolchain; - rm -rf external/*; - fi - if [ -d build-android/external ]; then - echo Removing current android toolchain; - rm -rf build-android/external/*; - fi - echo Done removing toolchains. - exit 0; - fi -} - -# Parameters are tool, current git repo location, tracked revision location -tool=glslang -dir=external/glslang -rev=external_revisions/glslang_revision -check_revision $tool $dir $rev - -tool=glslang_android -dir=build-android/external/glslang -rev=build-android/glslang_revision_android -check_revision $tool $dir $rev - -tool=spirv-tools_android -dir=build-android/external/spirv-tools -rev=build-android/spirv-tools_revision_android -check_revision $tool $dir $rev - -tool=spirv-headers_android -dir=build-android/external/spirv-tools/external/spirv-headers -rev=build-android/spirv-headers_revision_android -check_revision $tool $dir $rev - -tool=shaderc_android -dir=build-android/external/shaderc -rev=build-android/shaderc_revision_android -check_revision $tool $dir $rev - -exit 0 diff --git a/scripts/external_revision_generator.py b/scripts/external_revision_generator.py deleted file mode 100644 index 9ba9156b..00000000 --- a/scripts/external_revision_generator.py +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env python3 -# -# Copyright (c) 2015-2017 The Khronos Group Inc. -# Copyright (c) 2015-2017 Valve Corporation -# Copyright (c) 2015-2017 LunarG, Inc. -# Copyright (c) 2015-2017 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Author: Cort Stratton <cort@google.com> -# Author: Jean-Francois Roy <jfroy@google.com> - -import argparse -import hashlib -import subprocess - -def generate(symbol_name, commit_id, output_header_file): - # Write commit ID to output header file - with open(output_header_file, "w") as header_file: - # File Comment - file_comment = '// *** THIS FILE IS GENERATED - DO NOT EDIT ***\n' - file_comment += '// See external_revision_generator.py for modifications\n' - header_file.write(file_comment) - # Copyright Notice - copyright = '' - copyright += '\n' - copyright += '/***************************************************************************\n' - copyright += ' *\n' - copyright += ' * Copyright (c) 2015-2017 The Khronos Group Inc.\n' - copyright += ' * Copyright (c) 2015-2017 Valve Corporation\n' - copyright += ' * Copyright (c) 2015-2017 LunarG, Inc.\n' - copyright += ' * Copyright (c) 2015-2017 Google Inc.\n' - copyright += ' *\n' - copyright += ' * Licensed under the Apache License, Version 2.0 (the "License");\n' - copyright += ' * you may not use this file except in compliance with the License.\n' - copyright += ' * You may obtain a copy of the License at\n' - copyright += ' *\n' - copyright += ' * http://www.apache.org/licenses/LICENSE-2.0\n' - copyright += ' *\n' - copyright += ' * Unless required by applicable law or agreed to in writing, software\n' - copyright += ' * distributed under the License is distributed on an "AS IS" BASIS,\n' - copyright += ' * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n' - copyright += ' * See the License for the specific language governing permissions and\n' - copyright += ' * limitations under the License.\n' - copyright += ' *\n' - copyright += ' * Author: Chris Forbes <chrisforbes@google.com>\n' - copyright += ' * Author: Cort Stratton <cort@google.com>\n' - copyright += ' *\n' - copyright += ' ****************************************************************************/\n' - header_file.write(copyright) - # Contents - contents = '#pragma once\n\n' - contents += '#define %s "%s"\n' % (symbol_name, commit_id) - header_file.write(contents) - -def get_commit_id_from_git(git_binary, source_dir): - return subprocess.check_output([git_binary, "rev-parse", "HEAD"], cwd=source_dir).decode('utf-8').strip() - -def is_sha1(str): - try: str_as_int = int(str, 16) - except ValueError: return False - return len(str) == 40 - -def get_commit_id_from_file(rev_file): - with open(rev_file, 'r') as rev_stream: - rev_contents = rev_stream.read() - rev_contents_stripped = rev_contents.strip() - if is_sha1(rev_contents_stripped): - return rev_contents_stripped; - # otherwise, SHA1 the entire (unstripped) file contents - sha1 = hashlib.sha1(); - sha1.update(rev_contents.encode('utf-8')) - return sha1.hexdigest() - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument("-s", "--symbol_name", metavar="SYMBOL_NAME", required=True, help="C symbol name") - parser.add_argument("-o", "--output_header_file", metavar="OUTPUT_HEADER_FILE", required=True, help="output header file path") - rev_method_group = parser.add_mutually_exclusive_group(required=True) - rev_method_group.add_argument("--git_dir", metavar="SOURCE_DIR", help="git working copy directory") - rev_method_group.add_argument("--rev_file", metavar="REVISION_FILE", help="source revision file path (must contain a SHA1 hash") - args = parser.parse_args() - - # We can either parse the latest Git commit ID out of the specified repository (preferred where possible), - # or computing the SHA1 hash of the contents of a file passed on the command line and (where necessary -- - # e.g. when building the layers outside of a Git environment). - if args.git_dir is not None: - # Extract commit ID from the specified source directory - try: - commit_id = get_commit_id_from_git('git', args.git_dir) - except WindowsError: - # Call git.bat on Windows for compatiblity. - commit_id = get_commit_id_from_git('git.bat', args.git_dir) - elif args.rev_file is not None: - # Read the commit ID from a file. - commit_id = get_commit_id_from_file(args.rev_file) - - if not is_sha1(commit_id): - raise ValueError("commit ID for " + args.symbol_name + " must be a SHA1 hash.") - - generate(args.symbol_name, commit_id, args.output_header_file) - -if __name__ == '__main__': - main() diff --git a/update_external_sources.bat b/update_external_sources.bat deleted file mode 100644 index 63718dd7..00000000 --- a/update_external_sources.bat +++ /dev/null @@ -1,399 +0,0 @@ -@echo off -REM Update source for glslang - -REM Determine the appropriate CMake strings for the current version of Visual Studio -echo Determining VS version -python .\scripts\determine_vs_version.py > vsversion.tmp -set /p VS_VERSION=< vsversion.tmp -echo Detected Visual Studio Version as %VS_VERSION% - -REM Cleanup the file we used to collect the VS version output since it's no longer needed. -del /Q /F vsversion.tmp - -setlocal EnableDelayedExpansion -set errorCode=0 -set BUILD_DIR=%~dp0 -set BASE_DIR="%BUILD_DIR%external" -set REVISION_DIR="%BUILD_DIR%external_revisions" -set GLSLANG_DIR=%BASE_DIR%\glslang -set do_32=0 -set do_64=0 -set do_debug=0 -set do_release=0 - -git submodule update --init --recursive - -REM // ======== Parameter parsing ======== // - - set arg-use-implicit-component-list=1 - set arg-do-glslang=0 - set arg-no-sync=0 - set arg-no-build=0 - set arg-32=0 - set arg-64=0 - set arg-debug=0 - set arg-release=0 - - :parameterLoop - - if "%1"=="" goto:parameterContinue - - if "%1" == "--glslang" ( - set arg-do-glslang=1 - set arg-use-implicit-component-list=0 - echo Building glslang ^(%1^) - shift - goto:parameterLoop - ) - - if "%1" == "-g" ( - set arg-do-glslang=1 - set arg-use-implicit-component-list=0 - echo Building glslang ^(%1^) - shift - goto:parameterLoop - ) - - if "%1" == "--no-sync" ( - set arg-no-sync=1 - echo Skipping sync ^(%1^) - shift - goto:parameterLoop - ) - - if "%1" == "--no-build" ( - set arg-no-build=1 - echo Skipping build ^(%1^) - shift - goto:parameterLoop - ) - - if "%1" == "--32" ( - set arg-32=1 - echo 32-bit build requested - shift - goto:parameterLoop - ) - - if "%1" == "--64" ( - set arg-64=1 - echo 64-bit build requested - shift - goto:parameterLoop - ) - - if "%1" == "--debug" ( - set arg-debug=1 - echo debug build requested - shift - goto:parameterLoop - ) - - if "%1" == "--release" ( - set arg-release=1 - echo release build requested - shift - goto:parameterLoop - ) - - if "%1" == "--spirv-tools" ( - echo --spirv-tools argument has been deprecated and is no longer necessary - shift - goto:parameterLoop - ) - - if "%1" == "-s" ( - echo --s argument has been deprecated and is no longer necessary - shift - goto:parameterLoop - ) - - if "%1" == "--all" ( - echo --all argument has been deprecated and is no longer necessary - set arg-do-glslang=1 - set arg-use-implicit-component-list=0 - echo Building glslang ^(%1^) - shift - goto:parameterLoop - ) - - echo. - echo Unrecognized option "%1" - echo. - echo usage: update_external_sources.bat [options] - echo. - echo Available options: - echo -g ^| --glslang enable glslang component - echo --all enable all components - echo --no-sync skip sync from git - echo --no-build skip build - echo --32 build for 32-bit - echo --64 build for 64-bit - echo --debug build for debug - echo --release build for release - echo. - echo If any component enables are provided, only those components are enabled. - echo If no component enables are provided, all components are enabled. - echo. - echo Sync uses git to pull a specific revision. - echo Build configures CMake, builds Release and Debug. - echo. - echo --32 without --64 builds only 32-bit, and vice-versa. - echo --debug without --release builds only debug, and vice-versa. - echo Specifying neither or both --32 and --64 builds both. - echo Specifying neither or both --debug and --release builds both. - echo So specifying none of these 4 options (default) builds all 4. - - - goto:error - - :parameterContinue - - if %arg-use-implicit-component-list% equ 1 ( - echo Building glslang - set arg-do-glslang=1 - ) - - set sync-glslang=0 - set build-glslang=0 - set check-glslang-build-dependencies=0 - - if %arg-do-glslang% equ 1 ( - if %arg-no-sync% equ 0 ( - set sync-glslang=1 - ) - if %arg-no-build% equ 0 ( - set check-glslang-build-dependencies=1 - set build-glslang=1 - ) - ) - - if %arg-32% equ 1 ( - set do_32=1 - ) - if %arg-64% equ 1 ( - set do_64=1 - ) - if %arg-32% equ 0 ( - if %arg-64% equ 0 ( - set do_32=1 - set do_64=1 - ) - ) - - if %arg-debug% equ 1 ( - set do_debug=1 - ) - if %arg-release% equ 1 ( - set do_release=1 - ) - if %arg-debug% equ 0 ( - if %arg-release% equ 0 ( - set do_debug=1 - set do_release=1 - ) - ) - - REM this is a debugging aid that can be enabled while debugging command-line parsing - if 0 equ 1 ( - set arg - set sync-glslang - set build-glslang - set check-glslang-build-dependencies - goto:error - ) - -REM // ======== end Parameter parsing ======== // - - -REM // ======== Dependency checking ======== // - REM git is required for all paths - for %%X in (git.exe) do (set FOUND=%%~$PATH:X) - if not defined FOUND ( - echo Dependency check failed: - echo git.exe not found - echo Git for Windows can be downloaded here: https://git-scm.com/download/win - echo Install and ensure git.exe makes it into your PATH - set errorCode=1 - ) - - if %check-glslang-build-dependencies% equ 1 ( - for %%X in (cmake.exe) do (set FOUND=%%~$PATH:X) - if not defined FOUND ( - echo Dependency check failed: - echo cmake.exe not found - echo Get CMake for Windows here: http://www.cmake.org/cmake/resources/software.html - echo Install and ensure each makes it into your PATH, default is "C:\Program Files (x86)\CMake\bin" - set errorCode=1 - ) - ) - - - REM goto:main - -REM // ======== end Dependency checking ======== // - -:main - -if %errorCode% neq 0 (goto:error) - -REM Read the target versions from external file, which is shared with Linux script - -if not exist %REVISION_DIR%\glslang_giturl ( - echo. - echo Missing glslang_giturl file! Place it in %REVISION_DIR% with git repo URL in it. - set errorCode=1 - goto:error -) - -if not exist %REVISION_DIR%\glslang_revision ( - echo. - echo Missing glslang_revision file! Place it in %REVISION_DIR% with target version in it. - set errorCode=1 - goto:error -) - -set /p GLSLANG_GITURL= < %REVISION_DIR%\glslang_giturl -set /p GLSLANG_REVISION= < %REVISION_DIR%\glslang_revision - -echo GLSLANG_GITURL=%GLSLANG_GITURL% -echo GLSLANG_REVISION=%GLSLANG_REVISION% - - -echo Creating and/or updating glslang in %BASE_DIR% - -if %sync-glslang% equ 1 ( - if not exist %GLSLANG_DIR% ( - call:create_glslang - ) - if %errorCode% neq 0 (goto:error) - call:update_glslang - if %errorCode% neq 0 (goto:error) -) - -if %build-glslang% equ 1 ( - call:build_glslang - if %errorCode% neq 0 (goto:error) -) - -echo. -echo Exiting -goto:finish - -:error -echo. -echo Halting due to error -set errorCode=1 -goto:finish - -:finish -if not "%cd%\" == "%BUILD_DIR%" ( cd %BUILD_DIR% ) -exit /b %errorCode% - - -REM // ======== Functions ======== // - -:create_glslang - echo. - echo Creating local glslang repository %GLSLANG_DIR%) - mkdir %GLSLANG_DIR% - cd %GLSLANG_DIR% - git clone %GLSLANG_GITURL% . - git checkout %GLSLANG_REVISION% - python.exe .\update_glslang_sources.py - if not exist %GLSLANG_DIR%\SPIRV ( - echo glslang source download failed! - set errorCode=1 - ) -goto:eof - -:update_glslang - echo. - echo Updating %GLSLANG_DIR% - cd %GLSLANG_DIR% - git fetch --all - git checkout %GLSLANG_REVISION% - python.exe .\update_glslang_sources.py -goto:eof - -:build_glslang - echo. - echo Building %GLSLANG_DIR% - cd %GLSLANG_DIR% - - if not exist build32 ( - mkdir build32 - ) - if not exist build ( - mkdir build - ) - - set GLSLANG_BUILD_DIR=%GLSLANG_DIR%\build32 - if %do_32% equ 1 ( - echo Making 32-bit glslang - echo ************************* - cd %GLSLANG_BUILD_DIR% - - echo Generating 32-bit Glslang CMake files for Visual Studio %VS_VERSION% -DCMAKE_INSTALL_PREFIX=install .. - cmake -G "Visual Studio %VS_VERSION%" -DCMAKE_INSTALL_PREFIX=install .. - - if %do_debug% equ 1 ( - echo Building 32-bit Glslang: MSBuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Debug - msbuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Debug /verbosity:quiet - - REM Check for existence of one lib, even though we should check for all results - if not exist %GLSLANG_BUILD_DIR%\glslang\Debug\glslangd.lib ( - echo. - echo glslang 32-bit Debug build failed! - set errorCode=1 - ) - ) - if %do_release% equ 1 ( - echo Building Glslang: MSBuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Release - msbuild INSTALL.vcxproj /p:Platform=x86 /p:Configuration=Release /verbosity:quiet - - REM Check for existence of one lib, even though we should check for all results - if not exist %GLSLANG_BUILD_DIR%\glslang\Release\glslang.lib ( - echo. - echo glslang 32-bit Release build failed! - set errorCode=1 - ) - ) - cd .. - ) - - set GLSLANG_BUILD_DIR=%GLSLANG_DIR%\build - if %do_64% equ 1 ( - echo Making 64-bit glslang - echo ************************* - cd %GLSLANG_BUILD_DIR% - - echo Generating 64-bit Glslang CMake files for Visual Studio %VS_VERSION% -DCMAKE_INSTALL_PREFIX=install .. - cmake -G "Visual Studio %VS_VERSION% Win64" -DCMAKE_INSTALL_PREFIX=install .. - - if %do_debug% equ 1 ( - echo Building 64-bit Glslang: MSBuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Debug - msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Debug /verbosity:quiet - - REM Check for existence of one lib, even though we should check for all results - if not exist %GLSLANG_BUILD_DIR%\glslang\Debug\glslangd.lib ( - echo. - echo glslang 64-bit Debug build failed! - set errorCode=1 - ) - ) - if %do_release% equ 1 ( - echo Building Glslang: MSBuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Release - msbuild INSTALL.vcxproj /p:Platform=x64 /p:Configuration=Release /verbosity:quiet - - REM Check for existence of one lib, even though we should check for all results - if not exist %GLSLANG_BUILD_DIR%\glslang\Release\glslang.lib ( - echo. - echo glslang 64-bit Release build failed! - set errorCode=1 - ) - ) - cd .. - ) - -goto:eof diff --git a/update_external_sources.sh b/update_external_sources.sh deleted file mode 100755 index 333e94a0..00000000 --- a/update_external_sources.sh +++ /dev/null @@ -1,174 +0,0 @@ -#!/bin/bash -# Update source for glslang - -set -e - -if [[ $(uname) == "Linux" || $(uname) =~ "CYGWIN" ]]; then - CURRENT_DIR="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")" - CORE_COUNT=$(nproc || echo 4) -elif [[ $(uname) == "Darwin" ]]; then - CURRENT_DIR="$(dirname "$(python -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' ${BASH_SOURCE[0]})")" - CORE_COUNT=$(sysctl -n hw.ncpu || echo 4) -fi -echo CURRENT_DIR=$CURRENT_DIR -echo CORE_COUNT=$CORE_COUNT - -REVISION_DIR="$CURRENT_DIR/external_revisions" - -git submodule update --init --recursive - -# Use tr -d to remove line endings -GLSLANG_GITURL=$(cat "${REVISION_DIR}/glslang_giturl" | tr -d "\n\r") -GLSLANG_REVISION=$(cat "${REVISION_DIR}/glslang_revision" | tr -d "\n\r") - -echo "GLSLANG_GITURL=${GLSLANG_GITURL}" -echo "GLSLANG_REVISION=${GLSLANG_REVISION}" - -BUILDDIR=${CURRENT_DIR} -BASEDIR="$BUILDDIR/external" - -function create_glslang () { - rm -rf "${BASEDIR}"/glslang - echo "Creating local glslang repository (${BASEDIR}/glslang)." - mkdir -p "${BASEDIR}"/glslang - cd "${BASEDIR}"/glslang - git clone ${GLSLANG_GITURL} . - git checkout ${GLSLANG_REVISION} - ./update_glslang_sources.py -} - -function update_glslang () { - echo "Updating ${BASEDIR}/glslang" - cd "${BASEDIR}"/glslang - git fetch --all - git checkout --force ${GLSLANG_REVISION} - ./update_glslang_sources.py -} - -function build_glslang () { - echo "Building ${BASEDIR}/glslang" - cd "${BASEDIR}"/glslang - mkdir -p build - cd build - cmake -D CMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install .. - make -j $CORE_COUNT - make install -} - -function create_moltenvk () { - rm -rf "${BASEDIR}"/MoltenVK - echo "Creating local MoltenVK repository (${BASEDIR}/MoltenVK)." - mkdir -p "${BASEDIR}"/MoltenVK - cd "${BASEDIR}"/MoltenVK - git clone --recurse-submodules https://github.com/KhronosGroup/MoltenVK.git "${BASEDIR}"/MoltenVK -} - -function update_moltenvk () { - echo "Updating ${BASEDIR}/MoltenVK" - cd "${BASEDIR}"/MoltenVK - git pull -} - -function build_moltenvk () { - echo "Building ${BASEDIR}/MoltenVK" - cd "${BASEDIR}"/MoltenVK - ./fetchDependencies --v-lvl-root "${BUILDDIR}" --glslang-root "${BASEDIR}/glslang" - xcodebuild -project MoltenVKPackaging.xcodeproj \ - GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS MVK_LOGGING_ENABLED=0' \ - -scheme "MoltenVK (Release)" build -} - -INCLUDE_GLSLANG=false -INCLUDE_MOLTENVK=false -NO_SYNC=false -NO_BUILD=false -USE_IMPLICIT_COMPONENT_LIST=true - -# Parse options -while [[ $# > 0 ]] -do - option="$1" - - case $option in - # options to specify build of glslang components - -g|--glslang) - INCLUDE_GLSLANG=true - USE_IMPLICIT_COMPONENT_LIST=false - echo "Building glslang ($option)" - ;; - # options to specify build of moltenvk components - -m|--moltenvk) - if [[ $(uname) == "Darwin" ]]; then - INCLUDE_MOLTENVK=true - USE_IMPLICIT_COMPONENT_LIST=false - echo "Building MoltenVK ($option)" - fi - ;; - # options to specify build of spirv-tools components - -s|--spirv-tools) - echo "($option) is deprecated and is no longer necessary" - ;; - # option to specify skipping sync from git - --no-sync) - NO_SYNC=true - echo "Skipping sync ($option)" - ;; - # option to specify skipping build - --no-build) - NO_BUILD=true - echo "Skipping build ($option)" - ;; - *) - echo "Unrecognized option: $option" - echo "Usage: update_external_sources.sh [options]" - echo " Available options:" - echo " -g | --glslang # enable glslang component" - if [[ $(uname) == "Darwin" ]]; then - echo " -m | --moltenvk # enable moltenvk component" - fi - echo " --no-sync # skip sync from git" - echo " --no-build # skip build" - echo " If any component enables are provided, only those components are enabled." - echo " If no component enables are provided, all components are enabled." - echo " Sync uses git to pull a specific revision." - echo " Build configures CMake, builds Release." - exit 1 - ;; - esac - shift -done - -if [ ${USE_IMPLICIT_COMPONENT_LIST} == "true" ]; then - echo "Building glslang" - INCLUDE_GLSLANG=true - if [[ $(uname) == "Darwin" ]]; then - echo "Building MoltenVK" - INCLUDE_MOLTENVK=true - fi -fi - -if [ ${INCLUDE_GLSLANG} == "true" ]; then - if [ ${NO_SYNC} == "false" ]; then - if [ ! -d "${BASEDIR}/glslang" -o ! -d "${BASEDIR}/glslang/.git" -o -d "${BASEDIR}/glslang/.svn" ]; then - create_glslang - fi - update_glslang - fi - if [ ${NO_BUILD} == "false" ]; then - build_glslang - fi -fi - -if [ ${INCLUDE_MOLTENVK} == "true" ]; then - if [ ${NO_SYNC} == "false" ]; then - if [ ! -d "${BASEDIR}/MoltenVK" -o ! -d "${BASEDIR}/MoltenVK/.git" ]; then - create_moltenvk - fi - update_moltenvk - fi - if [ ${NO_BUILD} == "false" ]; then - echo "Building moltenvk" - build_moltenvk - fi -fi - |
