SPIRV-Cross/build_glslang_spirv_tools.sh
Hans-Kristian Arntzen 3a7cb0c2a9 Support running {,update_}test_shader.sh with CMake builds.
Make path to spirv-cross configurable so we can be a bit more flexible
with build systems used to update tests.
2019-04-12 14:56:10 +02:00

27 lines
606 B
Bash
Executable File

#!/bin/bash
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
cmake ../glslang -DCMAKE_BUILD_TYPE=$PROFILE -DCMAKE_INSTALL_PREFIX=output
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
cmake --build . --config $PROFILE --target install ${NPROC}
cd ../..