diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-05-27 18:54:03 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-05-27 18:54:03 -0700 |
commit | b400a5a855fbba21f131e8374b8f35567c1d30b6 (patch) | |
tree | 6fbf35ab126be9fe9bd1432b21027a6d02b8e4aa /CMakeLists.txt | |
parent | 01d610b383c597e61e5209f5c38b6d6a1c09d12e (diff) | |
download | subsurface-b400a5a855fbba21f131e8374b8f35567c1d30b6.tar.gz |
Android build: rely on KEYSTORE environment for release build
With the gradle build it seems we automatically get a Debug build unless
the keystore is defined.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 414655492..980e8ecc1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -365,10 +365,20 @@ endforeach() if(ANDROID) # Android template directory include(${QT_ANDROID_CMAKE}) - add_qt_android_apk(${SUBSURFACE_TARGET}.apk ${SUBSURFACE_TARGET} - PACKAGE_SOURCES ${CMAKE_BINARY_DIR}/android-mobile DEPENDS ${ANDROID_NATIVE_LIBSSL} ${ANDROID_NATIVE_LIBCRYPT} - BUILDTOOLS_REVISION ${BUILDTOOLS_REVISION} - ) + if((DEFINED ENV{KEYSTORE}) AND (DEFINED ENV{KEYSTORE_PASSWORD})) + add_qt_android_apk(${SUBSURFACE_TARGET}.apk ${SUBSURFACE_TARGET} + PACKAGE_SOURCES ${CMAKE_BINARY_DIR}/android-mobile DEPENDS ${ANDROID_NATIVE_LIBSSL} ${ANDROID_NATIVE_LIBCRYPT} + BUILDTOOLS_REVISION ${BUILDTOOLS_REVISION} + KEYSTORE $ENV{KEYSTORE} Subsurface-mobile KEYSTORE_PASSWORD $ENV{KEYSTORE_PASSWORD} + ) + message(STATUS "KEYSTORE=$ENV{KEYSTORE} KEYSTORE_PASSWORD=$ENV{KEYSTORE_PASSWORD}") + else() + add_qt_android_apk(${SUBSURFACE_TARGET}.apk ${SUBSURFACE_TARGET} + PACKAGE_SOURCES ${CMAKE_BINARY_DIR}/android-mobile DEPENDS ${ANDROID_NATIVE_LIBSSL} ${ANDROID_NATIVE_LIBCRYPT} + BUILDTOOLS_REVISION ${BUILDTOOLS_REVISION} + ) + message(STATUS "no KEYSTORE") + endif() elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set(APP_BUNDLE_DIR "${SUBSURFACE_TARGET}.app") if(${SUBSURFACE_TARGET_EXECUTABLE} MATCHES "MobileExecutable") |