2018-03-12 17:25:20 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-03-12 18:18:27 +00:00
|
|
|
PROFILE=Release
|
|
|
|
if [ ! -z $1 ]; then
|
|
|
|
PROFILE=$1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -z $2 ]; then
|
2018-10-26 08:53:11 +00:00
|
|
|
NPROC="--parallel $2"
|
2018-03-12 18:18:27 +00:00
|
|
|
fi
|
|
|
|
|
2018-03-12 17:25:20 +00:00
|
|
|
echo "Building glslang."
|
|
|
|
mkdir -p external/glslang-build
|
|
|
|
cd external/glslang-build
|
2018-10-26 08:53:11 +00:00
|
|
|
cmake ../glslang -DCMAKE_BUILD_TYPE=$PROFILE -DCMAKE_INSTALL_PREFIX=output
|
|
|
|
cmake --build . --target install ${NPROC}
|
2018-03-12 17:25:20 +00:00
|
|
|
cd ../..
|
|
|
|
|
|
|
|
echo "Building SPIRV-Tools."
|
|
|
|
mkdir -p external/spirv-tools-build
|
|
|
|
cd external/spirv-tools-build
|
2018-10-26 08:53:11 +00:00
|
|
|
cmake ../spirv-tools -DCMAKE_BUILD_TYPE=$PROFILE -DSPIRV_WERROR=OFF -DCMAKE_INSTALL_PREFIX=output
|
|
|
|
cmake --build . --target install ${NPROC}
|
2018-03-12 17:25:20 +00:00
|
|
|
cd ../..
|
|
|
|
|