Last active
August 5, 2025 23:31
-
-
Save Ylarod/6d21a9ed02edcfe438b7019d422de1c1 to your computer and use it in GitHub Desktop.
Android cross compile env setup for CLion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": 3, | |
| "cmakeMinimumRequired": { | |
| "major": 3, | |
| "minor": 21 | |
| }, | |
| "configurePresets": [ | |
| { | |
| "name": "android-base", | |
| "hidden": true, | |
| "description": "Base preset for Android NDK builds", | |
| "generator": "Ninja", | |
| "environment": { | |
| "TARGET_API_LEVEL": "30", | |
| "TARGET_STL_TYPE": "c++_static" | |
| }, | |
| "cacheVariables": { | |
| "CMAKE_TOOLCHAIN_FILE": "$env{ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake", | |
| "CMAKE_ANDROID_NDK": "$env{ANDROID_NDK_HOME}", | |
| "CMAKE_SYSTEM_NAME": "Android", | |
| "CMAKE_SYSTEM_VERSION": "$env{TARGET_API_LEVEL}", | |
| "ANDROID_PLATFORM": "android-$env{TARGET_API_LEVEL}", | |
| "CMAKE_BUILD_TYPE": "Debug", | |
| "CMAKE_ANDROID_STL_TYPE": "$env{TARGET_STL_TYPE}", | |
| "ANDROID_STL": "$env{TARGET_STL_TYPE}" | |
| } | |
| }, | |
| { | |
| "name": "android-armv7", | |
| "inherits": "android-base", | |
| "binaryDir": "build/android-armv7", | |
| "description": "Build for Android ARMv7 (32-bit)", | |
| "cacheVariables": { | |
| "CMAKE_ANDROID_ARCH_ABI": "armeabi-v7a", | |
| "ANDROID_ABI": "armeabi-v7a" | |
| } | |
| }, | |
| { | |
| "name": "android-arm64", | |
| "inherits": "android-base", | |
| "binaryDir": "build/android-arm64", | |
| "description": "Build for Android ARM64 (arm64-v8a)", | |
| "cacheVariables": { | |
| "CMAKE_ANDROID_ARCH_ABI": "arm64-v8a", | |
| "ANDROID_ABI": "arm64-v8a" | |
| } | |
| }, | |
| { | |
| "name": "android-x86", | |
| "inherits": "android-base", | |
| "binaryDir": "build/android-x86", | |
| "description": "Build for Android x86 (32-bit)", | |
| "cacheVariables": { | |
| "CMAKE_ANDROID_ARCH_ABI": "x86", | |
| "ANDROID_ABI": "x86" | |
| } | |
| }, | |
| { | |
| "name": "android-x86_64", | |
| "inherits": "android-base", | |
| "binaryDir": "build/android-x86_64", | |
| "description": "Build for Android x86_64", | |
| "cacheVariables": { | |
| "CMAKE_ANDROID_ARCH_ABI": "x86_64", | |
| "ANDROID_ABI": "x86_64" | |
| } | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment