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-01-03 15:21:10 +01:00
|
|
|
# This should be set to OFF in an svn tag
|
|
|
|
set(INCLUDE_SVN_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)
|
|
|
|
|
|
|
|
# Add svn revision
|
|
|
|
if(FORCE_SVN_REVISION)
|
|
|
|
set(SVN_REVISION ${FORCE_SVN_REVISION})
|
|
|
|
else(FORCE_SVN_REVISION)
|
|
|
|
include(FindSubversion)
|
2010-11-25 18:14:11 +01:00
|
|
|
find_package(Subversion)
|
2011-01-03 15:21:10 +01:00
|
|
|
|
|
|
|
if(Subversion_FOUND)
|
2010-12-06 14:41:06 +01:00
|
|
|
execute_process(COMMAND ${Subversion_SVN_EXECUTABLE} info ${PROJECT_SOURCE_DIR}
|
|
|
|
RESULT_VARIABLE SVN_INFO_RESULT
|
|
|
|
OUTPUT_QUIET
|
|
|
|
ERROR_QUIET)
|
|
|
|
if(${SVN_INFO_RESULT} EQUAL 0)
|
|
|
|
Subversion_WC_INFO(${PROJECT_SOURCE_DIR} clementine)
|
2011-01-03 15:21:10 +01:00
|
|
|
set(SVN_REVISION ${clementine_WC_REVISION})
|
2010-12-06 14:41:06 +01:00
|
|
|
endif(${SVN_INFO_RESULT} EQUAL 0)
|
2011-01-03 15:21:10 +01:00
|
|
|
endif(Subversion_FOUND)
|
|
|
|
endif(FORCE_SVN_REVISION)
|
2010-05-03 15:58:41 +02:00
|
|
|
|
2011-01-03 15:21:10 +01:00
|
|
|
if(INCLUDE_SVN_REVISION AND SVN_REVISION)
|
|
|
|
set(CLEMENTINE_VERSION_DISPLAY "${CLEMENTINE_VERSION_DISPLAY} r${SVN_REVISION}")
|
2011-01-03 15:33:03 +01:00
|
|
|
set(CLEMENTINE_VERSION_DEB "${CLEMENTINE_VERSION_DEB}.r${SVN_REVISION}")
|
2011-01-03 15:21:10 +01:00
|
|
|
set(CLEMENTINE_VERSION_RPM "${CLEMENTINE_VERSION_RPM}.r${SVN_REVISION}")
|
|
|
|
endif(INCLUDE_SVN_REVISION AND SVN_REVISION)
|