Skip to content

Commit

Permalink
3119: fix CPACK_PACKAGE_VERSION to be the GIT_DESCRIBE minus "v" prefix
Browse files Browse the repository at this point in the history
we were previously setting it to "." because
CPACK_PACKAGE_VERSION_MAJOR and CPACK_PACKAGE_VERSION_MINOR weren't filled
in.

Fixes TrenchBroom#3119
  • Loading branch information
ericwa committed Apr 22, 2020
1 parent 7582b1f commit 94593de
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ if(WIN32)
endif()
endif()

# Extract version information and configure CPack with it
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
# Set CPACK_PACKAGE_VERSION which is used by CPack.
# Strip the "v" prefix off GIT_DESCRIBE (e.g. "v2020.1-RC1") to produce a CPACK_PACKAGE_VERSION of "2020.1-RC1"
# Debian wants the first character to be a number
string(REGEX REPLACE "^v(.*)" "\\1" CPACK_PACKAGE_VERSION "${GIT_DESCRIBE}")
get_build_platform(APP_PLATFORM_NAME)

macro(configure_app_target APP_TARGET_NAME SHOULD_BUILD_MANUAL)
Expand Down

0 comments on commit 94593de

Please sign in to comment.