2010-05-03 15:58:41 +02:00
|
|
|
# Change this file when releasing a new version.
|
|
|
|
|
2010-09-19 22:44:31 +02:00
|
|
|
# Version numbers.
|
2010-05-03 15:58:41 +02:00
|
|
|
set(CLEMENTINE_VERSION_MAJOR 0)
|
2011-03-29 23:12:53 +02:00
|
|
|
set(CLEMENTINE_VERSION_MINOR 7)
|
2011-04-29 23:49:48 +02:00
|
|
|
set(CLEMENTINE_VERSION_PATCH 1)
|
2011-01-03 15:21:10 +01:00
|
|
|
#set(CLEMENTINE_VERSION_PRERELEASE rc1)
|
2010-06-07 22:23:28 +02:00
|
|
|
|
2011-07-19 16:55:47 +02:00
|
|
|
# This should be set to OFF in a tag
|
|
|
|
set(INCLUDE_GIT_REVISION ON)
|
2010-11-25 16:26:26 +01:00
|
|
|
|
2011-01-03 15:21:10 +01:00
|
|
|
# The format for version numbers is:
|
2011-03-29 23:12:53 +02:00
|
|
|
# Display: $major.$minor[.$patch] [$prerelease] [r$svn]
|
|
|
|
# Deb: $major.$minor[.$patch][~$prerelease][.r$svn]
|
|
|
|
# Rpm: $major.$minor[.$patch][$prerelease][.r$svn]
|
2011-01-03 15:21:10 +01:00
|
|
|
# And the rpm version is used for mac and windows
|
|
|
|
|
|
|
|
|
|
|
|
set(CLEMENTINE_VERSION_DISPLAY "${CLEMENTINE_VERSION_MAJOR}.${CLEMENTINE_VERSION_MINOR}")
|
|
|
|
set(CLEMENTINE_VERSION_DEB "${CLEMENTINE_VERSION_MAJOR}.${CLEMENTINE_VERSION_MINOR}")
|
|
|
|
set(CLEMENTINE_VERSION_RPM "${CLEMENTINE_VERSION_MAJOR}.${CLEMENTINE_VERSION_MINOR}")
|
|
|
|
|
2011-03-29 23:12:53 +02:00
|
|
|
# Add patch
|
|
|
|
if(CLEMENTINE_VERSION_PATCH)
|
|
|
|
set(CLEMENTINE_VERSION_DISPLAY "${CLEMENTINE_VERSION_DISPLAY}.${CLEMENTINE_VERSION_PATCH}")
|
|
|
|
set(CLEMENTINE_VERSION_DEB "${CLEMENTINE_VERSION_DEB}.${CLEMENTINE_VERSION_PATCH}")
|
|
|
|
set(CLEMENTINE_VERSION_RPM "${CLEMENTINE_VERSION_RPM}.${CLEMENTINE_VERSION_PATCH}")
|
|
|
|
endif(CLEMENTINE_VERSION_PATCH)
|
|
|
|
|
2011-01-03 15:21:10 +01:00
|
|
|
# Add prerelease
|
|
|
|
if(CLEMENTINE_VERSION_PRERELEASE)
|
|
|
|
set(CLEMENTINE_VERSION_DISPLAY "${CLEMENTINE_VERSION_DISPLAY} ${CLEMENTINE_VERSION_PRERELEASE}")
|
|
|
|
set(CLEMENTINE_VERSION_DEB "${CLEMENTINE_VERSION_DEB}~${CLEMENTINE_VERSION_PRERELEASE}")
|
|
|
|
set(CLEMENTINE_VERSION_RPM "${CLEMENTINE_VERSION_RPM}${CLEMENTINE_VERSION_PRERELEASE}")
|
|
|
|
endif(CLEMENTINE_VERSION_PRERELEASE)
|
|
|
|
|
2011-08-28 02:18:13 +02:00
|
|
|
# Add git revision
|
2011-07-19 16:55:47 +02:00
|
|
|
if(FORCE_GIT_REVISION)
|
|
|
|
set(GIT_REVISION ${FORCE_GIT_REVISION})
|
|
|
|
else(FORCE_GIT_REVISION)
|
|
|
|
find_program(GIT_EXECUTABLE git)
|
|
|
|
|
|
|
|
if(NOT GIT_EXECUTABLE-NOTFOUND)
|
|
|
|
execute_process(COMMAND ${GIT_EXECUTABLE} describe
|
|
|
|
RESULT_VARIABLE GIT_INFO_RESULT
|
|
|
|
OUTPUT_VARIABLE GIT_REV
|
|
|
|
ERROR_QUIET
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
if(${GIT_INFO_RESULT} EQUAL 0)
|
|
|
|
set(GIT_REVISION ${GIT_REV})
|
|
|
|
endif(${GIT_INFO_RESULT} EQUAL 0)
|
|
|
|
endif(NOT GIT_EXECUTABLE-NOTFOUND)
|
|
|
|
endif(FORCE_GIT_REVISION)
|
|
|
|
|
|
|
|
if(INCLUDE_GIT_REVISION AND GIT_REVISION)
|
|
|
|
set(CLEMENTINE_VERSION_DISPLAY "${GIT_REVISION}")
|
|
|
|
set(CLEMENTINE_VERSION_DEB "${GIT_REVISION}")
|
2011-08-28 02:18:13 +02:00
|
|
|
|
|
|
|
# RPM doesn't like dashes in version numbers
|
|
|
|
string(REPLACE "-" "." CLEMENTINE_VERSION_RPM "${GIT_REVISION}")
|
2011-07-19 16:55:47 +02:00
|
|
|
endif(INCLUDE_GIT_REVISION AND GIT_REVISION)
|