mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-28 18:41:14 +00:00
cmake: Allow customized prefix and suffix for packaging
This commit is contained in:
parent
b1f1942179
commit
a3a72089f7
1 changed files with 8 additions and 2 deletions
|
@ -20,6 +20,12 @@ configure_file(
|
|||
math(EXPR BITS "8*${CMAKE_SIZEOF_VOID_P}")
|
||||
|
||||
SET(INSTALL_DIR "${PROJECT_BINARY_DIR}/distribute" CACHE PATH "Installation directory")
|
||||
IF(NOT DEFINED PACKAGE_PREFIX)
|
||||
SET(PACKAGE_PREFIX "")
|
||||
ENDIF()
|
||||
IF(NOT DEFINED PACKAGE_SUFFIX)
|
||||
SET(PACKAGE_SUFFIX ".${VERSION_STR}")
|
||||
ENDIF()
|
||||
|
||||
################################################################################
|
||||
# Code
|
||||
|
@ -161,13 +167,13 @@ else()
|
|||
|
||||
# Zip Generator
|
||||
ADD_CUSTOM_TARGET(PACKAGE_ZIP COMMAND
|
||||
${CMAKE_COMMAND} -E tar "cfv" "${INSTALL_DIR}/obs-stream-effects.${VERSION_STR}.zip" --format=zip -- "${INSTALL_DIR}/data/" "${INSTALL_DIR}/obs-plugins"
|
||||
${CMAKE_COMMAND} -E tar "cfv" "${INSTALL_DIR}/${PACKAGE_PREFIX}obs-stream-effects${PACKAGE_SUFFIX}.zip" --format=zip -- "${INSTALL_DIR}/data/" "${INSTALL_DIR}/obs-plugins"
|
||||
DEPENDS INSTALL obs-stream-effects
|
||||
WORKING_DIRECTORY "${INSTALL_DIR}")
|
||||
|
||||
# 7-Zip Generator
|
||||
ADD_CUSTOM_TARGET(PACKAGE_7ZIP COMMAND
|
||||
${CMAKE_COMMAND} -E tar "cfv" "${INSTALL_DIR}/obs-stream-effects.${VERSION_STR}.7z" --format=7zip -- "${INSTALL_DIR}/data/" "${INSTALL_DIR}/obs-plugins"
|
||||
${CMAKE_COMMAND} -E tar "cfv" "${INSTALL_DIR}/${PACKAGE_PREFIX}obs-stream-effects${PACKAGE_SUFFIX}.7z" --format=7zip -- "${INSTALL_DIR}/data/" "${INSTALL_DIR}/obs-plugins"
|
||||
DEPENDS INSTALL obs-stream-effects
|
||||
WORKING_DIRECTORY "${INSTALL_DIR}")
|
||||
|
||||
|
|
Loading…
Reference in a new issue