diff --git a/util/spirv-plugins/_build.sh b/util/spirv-plugins/_build.sh index f3a044597..afffc4496 100644 --- a/util/spirv-plugins/_build.sh +++ b/util/spirv-plugins/_build.sh @@ -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 diff --git a/util/spirv-plugins/build_spirv_plugins.sh b/util/spirv-plugins/build_spirv_plugins.sh index f2d547086..ba5e1d1a7 100644 --- a/util/spirv-plugins/build_spirv_plugins.sh +++ b/util/spirv-plugins/build_spirv_plugins.sh @@ -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