Update build process for SPIR-V plugins

This commit is contained in:
baldurk
2020-05-21 17:53:37 +01:00
parent 50438987df
commit b468be50d3
2 changed files with 16 additions and 4 deletions
+2 -2
View File
@@ -33,7 +33,7 @@ pushd SPIRV-Cross
cmake --build . --config Release --target install
else
make -j$(nproc) install
strip --strip-unneeded ${OUT}/bin/*
strip --strip-unneeded $(ls ${OUT}/bin/* | grep -v .sh)
fi
popd #build
@@ -57,7 +57,7 @@ pushd glslang
cmake --build . --config Release --target install
else
make -j$(nproc) install
strip --strip-unneeded ${OUT}/bin/*
strip --strip-unneeded $(ls ${OUT}/bin/* | grep -v .sh)
fi
popd #build
+14 -2
View File
@@ -1,5 +1,17 @@
#!/bin/bash
native_path() {
if echo "${1}" | grep -q :; then
echo "${1}";
elif which cygpath >/dev/null 2>&1; then
cygpath -w "${1}";
elif which wslpath >/dev/null 2>&1; then
wslpath -w "${1}";
else
echo "${1}";
fi;
}
if [ ! -f build_spirv_plugins.sh ]; then
echo "Run this script from its folder like './build_spirv_plugins.sh'";
exit 1;
@@ -9,10 +21,10 @@ if uname -a | grep -qiE 'win|msys|cygwin|microsoft'; then
# Windows build
echo "Building for win32";
./_build.sh win32 $(pwd)/spirv-plugins-win32
./_build.sh win32 $(native_path $(pwd))/spirv-plugins-win32
echo "Building for win64";
./_build.sh win64 $(pwd)/spirv-plugins-win64
./_build.sh win64 $(native_path $(pwd))/spirv-plugins-win64
else
# Linux build