mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-10 22:05:06 +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}")
|
math(EXPR BITS "8*${CMAKE_SIZEOF_VOID_P}")
|
||||||
|
|
||||||
SET(INSTALL_DIR "${PROJECT_BINARY_DIR}/distribute" CACHE PATH "Installation directory")
|
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
|
# Code
|
||||||
|
@ -161,13 +167,13 @@ else()
|
||||||
|
|
||||||
# Zip Generator
|
# Zip Generator
|
||||||
ADD_CUSTOM_TARGET(PACKAGE_ZIP COMMAND
|
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
|
DEPENDS INSTALL obs-stream-effects
|
||||||
WORKING_DIRECTORY "${INSTALL_DIR}")
|
WORKING_DIRECTORY "${INSTALL_DIR}")
|
||||||
|
|
||||||
# 7-Zip Generator
|
# 7-Zip Generator
|
||||||
ADD_CUSTOM_TARGET(PACKAGE_7ZIP COMMAND
|
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
|
DEPENDS INSTALL obs-stream-effects
|
||||||
WORKING_DIRECTORY "${INSTALL_DIR}")
|
WORKING_DIRECTORY "${INSTALL_DIR}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue