Skip to content

Commit 8965bb0

Browse files
committed
Android: Copy relase APK to build root
1 parent 474044c commit 8965bb0

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

android/CPackConfig.cmake.in

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ file(INSTALL
6262
set(sign )
6363
set(result )
6464
set(final_message )
65-
$<$<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>>:$<$<AND:$<BOOL:${KEYSTORE_URL}>,$<BOOL:${KEYSTORE_ALIAS}>>:
65+
$<$<AND:$<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>>,$<BOOL:${KEYSTORE_URL}>,$<BOOL:${KEYSTORE_ALIAS}>>:
6666
if("@CMAKE_HOST_UNIX@")
6767
execute_process(COMMAND "${CMAKE_COMMAND}" -E echo "Checking if we are running in a terminal")
6868
execute_process(COMMAND tty RESULT_VARIABLE result)
@@ -78,7 +78,7 @@ if(NOT "@CMAKE_HOST_UNIX@" OR result)
7878
zipalign 4 /path/to/install-release-unsigned.apk outfile.apk"
7979
)
8080
endif()
81-
>>
81+
>
8282

8383
execute_process(
8484
COMMAND androiddeployqt
@@ -98,8 +98,15 @@ $<$<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>>:
9898
if(result)
9999
message(FATAL_ERROR "Running androiddeployqt failed: ${result}")
100100
endif()
101+
$<$<AND:$<OR:$<CONFIG:Release>,$<CONFIG:MinSizeRel>>,$<BOOL:${KEYSTORE_URL}>,$<BOOL:${KEYSTORE_ALIAS}>>:
102+
configure_file(
103+
"@CMAKE_CURRENT_BINARY_DIR@/Mapper/install/build/outputs/apk/install-release-signed.apk"
104+
"@PROJECT_BINARY_DIR@/@[email protected]"
105+
COPYONLY
106+
)
107+
>
101108

102109
if(final_message)
103110
message(STATUS "${final_message}")
104111
endif()
105-
112+

0 commit comments

Comments
 (0)