summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
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")