2018-03-12 17:25:20 +00:00
|
|
|
#!/bin/bash
|
2021-05-08 08:24:34 +00:00
|
|
|
# Copyright 2016-2021 The Khronos Group Inc.
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2018-03-12 17:25:20 +00:00
|
|
|
|
2018-03-12 18:18:27 +00:00
|
|
|
PROFILE=Release
|
2019-04-12 12:44:24 +00:00
|
|
|
|
2018-03-12 18:18:27 +00:00
|
|
|
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
|
2018-10-27 10:02:58 +00:00
|
|
|
cmake --build . --config $PROFILE --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
|
2018-10-27 10:02:58 +00:00
|
|
|
cmake --build . --config $PROFILE --target install ${NPROC}
|
2018-03-12 17:25:20 +00:00
|
|
|
cd ../..
|
|
|
|
|