Modules/CMakePresets.json
Шурупов Илья Викторович 949e8a95ca Build Android x86_64 for the emulator and add an emulator script
The APK now carries arm64-v8a and x86_64 libraries, and an
android-x86_64-debug preset builds the libraries for the emulator.
tools/android-emulator.sh starts a headless emulator, installs and runs
the app and shows its log.
2026-10-17 09:19:48 +03:00

73 lines
2.3 KiB
JSON

{
"version": 6,
"cmakeMinimumRequired": { "major": 3, "minor": 25, "patch": 0 },
"configurePresets": [
{
"name": "base",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_POLICY_VERSION_MINIMUM": "3.5"
}
},
{
"name": "linux-debug",
"displayName": "Linux Debug",
"inherits": "base",
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Linux" },
"cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }
},
{
"name": "linux-release",
"displayName": "Linux Release",
"inherits": "base",
"condition": { "type": "equals", "lhs": "${hostSystemName}", "rhs": "Linux" },
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }
},
{
"name": "android-base",
"hidden": true,
"inherits": "base",
"toolchainFile": "$env{ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake",
"cacheVariables": {
"ANDROID_ABI": "arm64-v8a",
"ANDROID_PLATFORM": "android-31",
"ANDROID_STL": "c++_shared",
"MODULES_BUILD_DESKTOP": "OFF",
"MODULES_BUILD_TESTS": "OFF",
"MODULES_BUILD_EXAMPLES": "OFF"
}
},
{
"name": "android-arm64-debug",
"displayName": "Android arm64 Debug",
"inherits": "android-base",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }
},
{
"name": "android-arm64-release",
"displayName": "Android arm64 Release",
"inherits": "android-base",
"cacheVariables": { "CMAKE_BUILD_TYPE": "Release" }
},
{
"name": "android-x86_64-debug",
"displayName": "Android x86_64 Debug (emulator)",
"inherits": "android-base",
"cacheVariables": { "ANDROID_ABI": "x86_64", "CMAKE_BUILD_TYPE": "Debug" }
}
],
"buildPresets": [
{ "name": "linux-debug", "configurePreset": "linux-debug" },
{ "name": "linux-release", "configurePreset": "linux-release" },
{ "name": "android-arm64-debug", "configurePreset": "android-arm64-debug" },
{ "name": "android-arm64-release", "configurePreset": "android-arm64-release" },
{ "name": "android-x86_64-debug", "configurePreset": "android-x86_64-debug" }
],
"testPresets": [
{ "name": "linux-debug", "configurePreset": "linux-debug", "output": { "outputOnFailure": true } },
{ "name": "linux-release", "configurePreset": "linux-release", "output": { "outputOnFailure": true } }
]
}