From f2c10affee0f8250e3b695d85aa3e3c8c8c791fd Mon Sep 17 00:00:00 2001 From: LongYinan Date: Thu, 15 Dec 2022 21:59:13 +0800 Subject: [PATCH] fix(cli): set cmake toolchain for android cross build (#1394) --- cli/src/build.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli/src/build.ts b/cli/src/build.ts index 4ee9cddc..d043cd82 100644 --- a/cli/src/build.ts +++ b/cli/src/build.ts @@ -429,6 +429,8 @@ export class BuildCommand extends Command { CC: `${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/${targetArch}-linux-${targetPlatform}-clang`, CXX: `${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/${targetArch}-linux-${targetPlatform}-clang++`, AR: `${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar`, + CMAKE_TOOLCHAIN_FILE_armv7_linux_androideabi: `${ANDROID_NDK_LATEST_HOME}/build/cmake/android.toolchain.cmake`, + CMAKE_TOOLCHAIN_FILE_aarch64_linux_android: `${ANDROID_NDK_LATEST_HOME}/build/cmake/android.toolchain.cmake`, PATH: `${ANDROID_NDK_LATEST_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${process.env.PATH}`, }) }