aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--DEPS1
-rwxr-xr-xplatform_tools/android/bin/android_setup.sh15
-rw-r--r--tools/build_shaderc.py5
3 files changed, 14 insertions, 7 deletions
diff --git a/DEPS b/DEPS
index d7ec409861..b06c80b12d 100644
--- a/DEPS
+++ b/DEPS
@@ -53,7 +53,6 @@ deps = {
"third_party/externals/shaderc2/third_party/googletest" : "https://github.com/google/googletest.git@d225acc90bc3a8c420a9bcd1f033033c1ccd7fe0",
"third_party/externals/shaderc2/third_party/glslang" : "https://github.com/google/glslang.git@e1cd410d9c03a24c00c570c91a99cad88bb475d1",
"third_party/externals/shaderc2/third_party/spirv-tools" : "https://github.com/KhronosGroup/SPIRV-Tools.git@009c4358b5a1c93203166b3ed60a548f63522e81",
- "third_party/externals/shaderc2/third_party/android-cmake" : "https://github.com/taka-no-me/android-cmake.git@556cc14296c226f753a3778d99d8b60778b7df4f",
}
deps_os = {
diff --git a/platform_tools/android/bin/android_setup.sh b/platform_tools/android/bin/android_setup.sh
index 503ee023e7..f242bfa51b 100755
--- a/platform_tools/android/bin/android_setup.sh
+++ b/platform_tools/android/bin/android_setup.sh
@@ -52,10 +52,6 @@ if [ "$USE_CLANG" == "true" ]; then
export GYP_DEFINES="skia_clang_build=1 $GYP_DEFINES"
fi
-if [ "$SKIA_VULKAN" == "true" ]; then
- export GYP_DEFINES="skia_vulkan=1 $GYP_DEFINES"
-fi
-
function verbose {
if [[ -n $VERBOSE ]]; then
echo $@
@@ -89,6 +85,17 @@ if [ -z "$ANDROID_HOME" ]; then
exportVar ANDROID_HOME $ANDROID_SDK_ROOT
fi
+if [ "$SKIA_VULKAN" == "true" ]; then
+ export GYP_DEFINES="skia_vulkan=1 $GYP_DEFINES"
+ # add cmake from the SDK to your path if it doesn't exist
+ if [ ! -d "${ANDROID_SDK_ROOT}/cmake" ]; then
+ echo "The Android SDK Tools version of CMake is required to build Vulkan. ${ANDROID_SDK_ROOT}/cmake"
+ exit 1
+ else
+ export PATH=${ANDROID_SDK_ROOT}/cmake/bin:$PATH
+ fi
+fi
+
# Helper function to configure the GYP defines to the appropriate values
# based on the target device.
setup_device() {
diff --git a/tools/build_shaderc.py b/tools/build_shaderc.py
index 0a3fc3aa28..d1ece210d9 100644
--- a/tools/build_shaderc.py
+++ b/tools/build_shaderc.py
@@ -73,8 +73,9 @@ def main():
'-DSPIRV_SKIP_EXECUTABLES=ON',
'-DSHADERC_ENABLE_SHARED_CRT=ON']
if args.android_toolchain and args.android_toolchain.strip() :
- cmake_cmd.append('-DCMAKE_TOOLCHAIN_FILE=' + args.src_dir +\
- '/third_party/android-cmake/android.toolchain.cmake')
+ cmake_cmd.append('-DCMAKE_TOOLCHAIN_FILE=' +\
+ os.environ['ANDROID_SDK_ROOT'] +\
+ '/cmake/android.toolchain.cmake')
cmake_cmd.append('-DANDROID_TOOLCHAIN_NAME=standalone-clang')
cmake_cmd.append('-DANDROID_STANDALONE_TOOLCHAIN=' +\
os.path.abspath(args.android_toolchain))