SPIRV-Cross-Vulnerable/build_glslang_spirv_tools.sh

29 lines
706 B
Bash
Raw Normal View History

#!/bin/bash
2021-05-08 08:24:34 +00:00
# Copyright 2016-2021 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
PROFILE=Release
if [ ! -z $1 ]; then
PROFILE=$1
fi
if [ ! -z $2 ]; then
NPROC="--parallel $2"
fi
echo "Building glslang."
mkdir -p external/glslang-build
cd external/glslang-build
2024-01-05 12:03:42 +00:00
cmake ../glslang -DCMAKE_BUILD_TYPE=$PROFILE -DCMAKE_INSTALL_PREFIX=output -DENABLE_OPT=OFF
2018-10-27 10:02:58 +00:00
cmake --build . --config $PROFILE --target install ${NPROC}
cd ../..
echo "Building SPIRV-Tools."
mkdir -p external/spirv-tools-build
cd external/spirv-tools-build
cmake ../spirv-tools -DCMAKE_BUILD_TYPE=$PROFILE -DSPIRV_WERROR=OFF -DCMAKE_INSTALL_PREFIX=output
2018-10-27 10:02:58 +00:00
cmake --build . --config $PROFILE --target install ${NPROC}
cd ../..