Files
cocos4/native/utils/generate_compile_commands_android.sh
T
Yun Hsiao Wu 90f345b768 format & type fixes (#3428)
* separate script for windows

* buffer.update const qualifier

* fix ES2 MRT supprot

* vk: subpass support

* better enum operators
2021-04-19 22:23:23 +08:00

18 lines
684 B
Bash
Executable File

if [ $# -ne 0 ]; then
ndk_path=$1
elif [ -n "$ANDROID_NDK_HOME" ]; then
ndk_path=$ANDROID_NDK_HOME
elif [ -n "$ANDROID_NDK_ROOT" ]; then
ndk_path=$ANDROID_NDK_ROOT
elif [ -n "$NDK_ROOT" ]; then
ndk_path=$NDK_ROOT
else
echo "Cannot find NDK root path"
exit 1
fi
cp CMakeLists.txt CMakeLists-bak.txt
cat utils/CMakeLists.header.txt CMakeLists-bak.txt > CMakeLists.txt
cmake -Bbuild -DCC_USE_GLES2=ON -DCC_USE_VULKAN=ON -DCC_USE_GLES3=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_TOOLCHAIN_FILE="$ndk_path/build/cmake/android.toolchain.cmake" -DANDROID_PLATFORM=android-21 -G"Unix Makefiles"
mv CMakeLists-bak.txt CMakeLists.txt
cp build/compile_commands.json .