Support packaging output path & version suffix
This commit is contained in:
parent
e06549f4dc
commit
a14f936cf0
1 changed files with 3 additions and 1 deletions
|
|
@ -1,4 +1,6 @@
|
|||
option(PSEMEK_PACKAGE_MODE "Enable packaging mode" OFF)
|
||||
set(PSEMEK_PACKAGE_OUTPUT_PATH "" CACHE STRING "Packaging output path")
|
||||
set(PSEMEK_PACKAGE_VERSION_SUFFIX "" CACHE STRING "Packaging version suffix")
|
||||
|
||||
if(PSEMEK_PACKAGE_MODE)
|
||||
if(WIN32)
|
||||
|
|
@ -47,7 +49,7 @@ function(psemek_add_executable target)
|
|||
endif()
|
||||
|
||||
add_custom_command(TARGET ${target} POST_BUILD
|
||||
COMMAND zip ${CMAKE_CURRENT_SOURCE_DIR}/${target}-${PSEMEK_PACKAGE_SUFFIX}.zip -j $<TARGET_FILE:${target}> ${PSEMEK_PACKAGE_COPY_FILES}
|
||||
COMMAND zip -v ${CMAKE_CURRENT_LIST_DIR}/${PSEMEK_PACKAGE_OUTPUT_PATH}/${target}${PSEMEK_PACKAGE_VERSION_SUFFIX}-${PSEMEK_PACKAGE_SUFFIX}.zip -j $<TARGET_FILE:${target}> ${PSEMEK_PACKAGE_COPY_FILES}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue