update script
This commit is contained in:
parent
37661c07ac
commit
53eb211a1e
8
build.sh
8
build.sh
@ -2,7 +2,12 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
script_dir=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
|
script_dir=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
|
||||||
build="$script_dir/build"
|
base_dir="$1"
|
||||||
|
if [ -z "$base_dir" ]; then
|
||||||
|
base_dir="$script_dir"
|
||||||
|
fi
|
||||||
|
|
||||||
|
build="$base_dir/build"
|
||||||
|
|
||||||
if [ -x "$(command -v g++)" ]; then cpp_compiler="g++"; c_compiler="gcc";
|
if [ -x "$(command -v g++)" ]; then cpp_compiler="g++"; c_compiler="gcc";
|
||||||
elif [ -x "$(command -v clang++)" ]; then cpp_compiler="clang++"; c_compiler="clang";
|
elif [ -x "$(command -v clang++)" ]; then cpp_compiler="clang++"; c_compiler="clang";
|
||||||
@ -68,3 +73,4 @@ base_name=$(basename -- "$shader" .glsl)
|
|||||||
|
|
||||||
$shader_compiler $shader_flags $shader_stage $shader "${shader_out}${base_name}.spv"
|
$shader_compiler $shader_flags $shader_stage $shader "${shader_out}${base_name}.spv"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user