mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-10 22:05:06 +00:00
cmake: Add support for version suffixes
This commit is contained in:
parent
a99030f5c0
commit
8c3979a3c2
1 changed files with 3 additions and 2 deletions
|
@ -23,12 +23,13 @@ set(VERSION_MAJOR 0)
|
|||
set(VERSION_MINOR 7)
|
||||
set(VERSION_PATCH 1)
|
||||
set(VERSION_TWEAK 0)
|
||||
set(VERSION_SUFFIX "")
|
||||
set(PROJECT_COMMIT "N/A")
|
||||
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/.git")
|
||||
set(GIT_RESULT "")
|
||||
set(GIT_OUTPUT "")
|
||||
execute_process(
|
||||
COMMAND git rev-list --count --topo-order ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}..HEAD
|
||||
COMMAND git rev-list --count --topo-order ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SUFFIX}..HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
||||
RESULT_VARIABLE GIT_RESULT
|
||||
OUTPUT_VARIABLE GIT_OUTPUT
|
||||
|
@ -157,7 +158,7 @@ configure_file(
|
|||
|
||||
# Packaging
|
||||
if("${CMAKE_PACKAGE_SUFFIX_OVERRIDE}" STREQUAL "")
|
||||
set(_PACKAGE_SUFFIX_OVERRIDE "${PROJECT_VERSION}-${PROJECT_COMMIT}")
|
||||
set(_PACKAGE_SUFFIX_OVERRIDE "${PROJECT_VERSION}${VERSION_SUFFIX}-${PROJECT_COMMIT}")
|
||||
else()
|
||||
set(_PACKAGE_SUFFIX_OVERRIDE "${CMAKE_PACKAGE_SUFFIX_OVERRIDE}")
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue