chore: update the building script

This commit is contained in:
Qsaker 2023-11-26 01:38:32 +08:00
parent 04518beb08
commit 49e520b6c4
2 changed files with 8 additions and 6 deletions

View File

@ -80,11 +80,11 @@ function(sak_add_executable target sources)
endwhile()
if(ANDROID)
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:${target}>"
"${CMAKE_BINARY_DIR}/android-build/libs/${ANDROID_ABI}/$<TARGET_FILE_NAME:${target}>")
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:${target}>"
"${CMAKE_BINARY_DIR}/android-build/libs/${ANDROID_ABI}/$<TARGET_FILE_NAME:${target}>")
endif()
sak_copy_glog(${target})
@ -113,7 +113,7 @@ function(sak_tar_target target)
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E tar "cf" ${TAR_FILE_NAME}.zip "--format=zip ${target}"
COMMAND ${CMAKE_COMMAND} -E tar "cf" ${TAR_FILE_NAME}.zip "--format=zip" ${target}
WORKING_DIRECTORY ${SAK_BINARY_DIR})
endif()
endfunction()

View File

@ -11,6 +11,8 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v3
- name: call cmake -G -h
run: cmake -G -h
- name: install qt for desktop
uses: jurplel/install-qt-action@v3
with: