From 6ba8fff8d8e39ad5110df3d0f9c8ec1b7a8e13b0 Mon Sep 17 00:00:00 2001 From: Anatoliy Tomilov Date: Fri, 8 May 2020 13:40:21 +0500 Subject: [PATCH] add linux NDK support in generate_vulkan_shaders.sh --- tools/unix/generate_vulkan_shaders.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/unix/generate_vulkan_shaders.sh b/tools/unix/generate_vulkan_shaders.sh index 4e3ff7d0ab..ea4a42a00f 100755 --- a/tools/unix/generate_vulkan_shaders.sh +++ b/tools/unix/generate_vulkan_shaders.sh @@ -11,7 +11,16 @@ MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized source "$MY_PATH/../autobuild/ndk_helper.sh" export NDK_ROOT=$(GetNdkRoot) || ( echo "Can't read NDK root path from android/local.properties"; exit 1 ) -GLSLC_PATH="$NDK_ROOT/shader-tools/darwin-x86_64/glslc" +KERNEL_NAME="$( uname -s )" +if [[ $KERNEL_NAME == 'Darwin' ]] +then + GLSLC_PATH="$NDK_ROOT/shader-tools/darwin-x86_64/glslc" +elif [[ $KERNEL_NAME == 'Linux' ]] +then + GLSLC_PATH="$NDK_ROOT/shader-tools/linux-x86_64/glslc" +else + echo "Unknown kernel"; exit 1 +fi OMIM_PATH="${OMIM_PATH:-$(cd "$(dirname "$0")/../.."; pwd)}" SHADERS_GENERATOR="$OMIM_PATH/shaders/vulkan_shaders_preprocessor.py"