Skip to content

Instantly share code, notes, and snippets.

@SeeFlowerX
Created April 17, 2024 05:58
Show Gist options
  • Save SeeFlowerX/72a55189c89465839b47070811c7fda8 to your computer and use it in GitHub Desktop.
Save SeeFlowerX/72a55189c89465839b47070811c7fda8 to your computer and use it in GitHub Desktop.
ndk + cmake on Windows
@echo on
set PATH=%PATH%;C:\Users\....\AppData\Local\Android\Sdk\cmake\3.22.1\bin
set ANDROID_NDK=C:/Users/..../AppData/Local/Android/Sdk/ndk/25.1.8937393
mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK%/build/cmake/android.toolchain.cmake ^
-DANDROID=1 ^
-DANDROID_ABI="arm64-v8a" ^
-DANDROID_NDK=%ANDROID_NDK% ^
-DANDROID_PLATFORM=android-21 ^
-DCMAKE_GENERATOR=Ninja ^
..
ninja
cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment