From dbc5a188017dd5a8bdd7ef2d967a7cfc54592560 Mon Sep 17 00:00:00 2001 From: Martchus Date: Thu, 22 Aug 2019 01:05:45 +0200 Subject: [PATCH] Allow setting custom app ID and label via CMake args So one can produce different configurations/versions/flavors of the app which can be installed at the same time. --- cmake/modules/AndroidApk.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/modules/AndroidApk.cmake b/cmake/modules/AndroidApk.cmake index d074f10..89ea46c 100644 --- a/cmake/modules/AndroidApk.cmake +++ b/cmake/modules/AndroidApk.cmake @@ -19,9 +19,12 @@ if (NOT EXISTS "${CMAKE_ANDROID_NDK}") message(FATAL_ERROR "CMAKE_ANDROID_NDK must contain the path of the Android NDK.") endif () +# determine some variables if (NOT META_ANDROID_PACKAGE_NAME) message(FATAL_ERROR "Attempt to load AndroidApk.cmake without having set ANDROID_PACKAGE_NAME.") endif () +set(ANDROID_APK_APPLICATION_ID_SUFFIX "" CACHE STRING "suffix for Android APK ID, use e.g. \".debug\" to produce a co-installable debug version") +set(ANDROID_APK_APPLICATION_LABEL "${META_APP_NAME}" CACHE STRING "user visible name for the APK") # find "android" subdirectory in the source directory and check for AndroidManifest.xml set(ANDROID_APK_SUBDIR "${CMAKE_CURRENT_SOURCE_DIR}/android")