diff --git a/CMakeLists.txt b/CMakeLists.txt index dba0b82d..7688a760 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -662,7 +662,7 @@ if(LIB) # Precompiled header #add_custom_target(pip_pch ALL COMMAND ${CMAKE_CXX_COMPILER} -O2 -fPIC -g3 ${CMAKE_INSTALL_PREFIX}/include/pip/pip.h DEPENDS pip SOURCES ${HDRS}) #list(APPEND HDRS "pip.h.gch") - file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in") + file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in" "cmake/android_debug.keystore") install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules) else() if(NOT PIP_FREERTOS) diff --git a/cmake/DeployMacros.cmake b/cmake/DeployMacros.cmake index e3db6bd2..1d719376 100644 --- a/cmake/DeployMacros.cmake +++ b/cmake/DeployMacros.cmake @@ -49,6 +49,19 @@ You can setup several properties in one command +make_rc( ) + +Generate Windows *.rc file from deploy properties +and return file path to +On other platforms this variable set to empty + +You should set version and deploy properties +before call this macro, see +"set_version()" and "set_deploy_property()" + + + + deploy_target( [DEPLOY_DIR ] [DESTINATION ] [RESOURCES [ ...] ] [PLUGINS [ ...] ] @@ -98,19 +111,6 @@ depends on target platform DEPLOY_ADD_LIBPATH variable used as additional library search path - - - -make_rc( ) - -Generate Windows *.rc file from deploy properties -and return file path to -On other platforms this variable set to empty - -You should set version and deploy properties -before call this macro, see -"set_version()" and "set_deploy_property()" - ]] @@ -358,6 +358,9 @@ macro(__add_file_or_dir _DIR_VAR _FILE_VAR _PATH _RELPATH) endif() #if (EXISTS "${_p}") if ("${_p}" MATCHES ".*/") + string(LENGTH "${_p}" __sl) + math(EXPR __sl ${__sl}-1) + string(SUBSTRING "${_p}" 0 ${__sl} _p) list(APPEND ${_DIR_VAR} "${_p}") else() list(APPEND ${_FILE_VAR} "${_p}") @@ -495,6 +498,9 @@ set(__macos_privacies #} set(__gradle_sign " signingConfigs { + debug { + storeFile file(DEBUG_STORE_FILE) + } release { storeFile file(RELEASE_STORE_FILE) storePassword RELEASE_STORE_PASSWORD @@ -504,6 +510,9 @@ set(__gradle_sign } buildTypes { + debug { + signingConfig signingConfigs.debug + } release { signingConfig signingConfigs.release } @@ -823,6 +832,7 @@ macro(deploy_target _T) if (NOT IS_ABSOLUTE "${ANDROID_STORE_FILE}") set(ANDROID_STORE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/android/${ANDROID_STORE_FILE}") endif() + set(__ANDROID_DEBUG_KEYSTORE__ "${_modules_dir}/android_debug.keystore") set(QT_DIR ${Qt5_ROOT}) set(_out_json "${CMAKE_CURRENT_BINARY_DIR}/${_T}_android_deployment_settings.json") configure_file("${CMAKE_BINARY_DIR}/android_deployment_settings.json.in" "${_out_json}") diff --git a/cmake/android_debug.keystore b/cmake/android_debug.keystore new file mode 100644 index 00000000..bd7bac48 Binary files /dev/null and b/cmake/android_debug.keystore differ diff --git a/cmake/gradle.properties.in b/cmake/gradle.properties.in index 65e0429f..ab415867 100644 --- a/cmake/gradle.properties.in +++ b/cmake/gradle.properties.in @@ -2,6 +2,7 @@ androidBuildToolsVersion= androidCompileSdkVersion=@ANDROID_TARGET_SDK@ buildDir=build qt5AndroidDir=@Qt5_ROOT@/src/android/java +DEBUG_STORE_FILE=@__ANDROID_DEBUG_KEYSTORE__@ RELEASE_STORE_FILE=@ANDROID_STORE_FILE@ RELEASE_STORE_PASSWORD=@ANDROID_STORE_PASSWORD@ RELEASE_KEY_PASSWORD=@ANDROID_KEY_PASSWORD@