Skip to content

Commit

Permalink
Trimmed leading 'v' from version names
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalcieslak committed May 15, 2017
1 parent c6125fc commit ac2a3ac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ execute_process(
OUTPUT_VARIABLE PROJECT_VERSION_LONG
OUTPUT_STRIP_TRAILING_WHITESPACE
)
string(SUBSTRING ${PROJECT_VERSION_SHORT} 1 -1 PROJECT_VERSION_VERYSHORT)
# Trim the leading "v"
string(SUBSTRING ${PROJECT_VERSION_SHORT} 1 -1 PROJECT_VERSION_SHORT)
string(SUBSTRING ${PROJECT_VERSION_LONG} 1 -1 PROJECT_VERSION_LONG)
set(PROJECT_VERSION_VERYSHORT ${PROJECT_VERSION_SHORT})
if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
string(CONCAT PROJECT_VERSION_SHORT ${PROJECT_VERSION_SHORT} "-debug")
string(CONCAT PROJECT_VERSION_LONG ${PROJECT_VERSION_LONG} "-debug")
Expand Down

0 comments on commit ac2a3ac

Please sign in to comment.