diff --git a/AddQtAndroidApk.cmake b/AddQtAndroidApk.cmake index 2f77f89..c6803d2 100644 --- a/AddQtAndroidApk.cmake +++ b/AddQtAndroidApk.cmake @@ -60,6 +60,7 @@ include(CMakeParseArguments) # PACKAGE_SOURCES ${CMAKE_CURRENT_LIST_DIR}/my-android-sources # KEYSTORE ${CMAKE_CURRENT_LIST_DIR}/mykey.keystore myalias # KEYSTORE_PASSWORD xxxx +# KEY_PASSWORD xxxx # DEPENDS a_linked_target "path/to/a_linked_library.so" ... # INSTALL #) @@ -67,7 +68,7 @@ include(CMakeParseArguments) macro(add_qt_android_apk TARGET SOURCE_TARGET) # parse the macro arguments - cmake_parse_arguments(ARG "INSTALL" "NAME;VERSION_CODE;PACKAGE_NAME;PACKAGE_SOURCES;KEYSTORE_PASSWORD" "DEPENDS;KEYSTORE;APK_BUILD_TYPE" ${ARGN}) + cmake_parse_arguments(ARG "INSTALL" "NAME;VERSION_CODE;PACKAGE_NAME;PACKAGE_SOURCES;KEYSTORE_PASSWORD;KEY_PASSWORD" "DEPENDS;KEYSTORE;APK_BUILD_TYPE" ${ARGN}) # extract the full path of the source target binary set(QT_ANDROID_APP_PATH "$") # full file path to the app's main shared library @@ -262,7 +263,7 @@ macro(add_qt_android_apk TARGET SOURCE_TARGET) if(ARG_KEYSTORE) set(SIGN_OPTIONS --sign ${ARG_KEYSTORE}) if(ARG_KEYSTORE_PASSWORD) - set(SIGN_OPTIONS ${SIGN_OPTIONS} --storepass ${ARG_KEYSTORE_PASSWORD}) + set(SIGN_OPTIONS ${SIGN_OPTIONS} --keypass ${ARG_KEY_PASSWORD} --storepass ${ARG_KEYSTORE_PASSWORD}) endif() endif() diff --git a/readme.md b/readme.md index 1411bbd..d0ec8e9 100644 --- a/readme.md +++ b/readme.md @@ -168,6 +168,19 @@ add_qt_android_apk(my_app_apk my_app ) ``` +### KEY_PASSWORD + +The password associated to the given key. Note that this option is only considered if the ```KEYSTORE``` argument is used. If it is not given, the password will be asked directly in the console at build time. + +Example: + +```cmake +add_qt_android_apk(my_app_apk my_app + KEYSTORE ${CMAKE_CURRENT_LIST_DIR}/mykey.keystore myalias + KEY_PASSWORD xxxxx +) +``` + ### DEPENDS A list of dependencies (libraries) to be included into the APK. All the dependencies of the application must be listed here; if one is missing, the deployed application will fail to run on the device. The listed items can be either target names, or library paths.