r14911 by cbradney - Fix VERSION string to not include separators when not needed

scribus-commit scribus-commit at lists.scribus.net
Sat Mar 20 09:30:33 CET 2010


Revision: 14911
Author: cbradney
Date: 2010-03-20T08:23:23.091096Z
Commit message: Fix VERSION string to not include separators when not needed

Changeset: 
M  /trunk/Scribus/CMakeLists.txt

Diffs:
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 14910)
+++ CMakeLists.txt	(revision 14911)
@@ -72,13 +72,22 @@
 #Project Setup
 PROJECT(scribus)
 #Set our version values
-#Final version is ${VERSION} = ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SUFFIX}
+#Final version is ${VERSION} = ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_SUFFIX}
 #where VERSION_SUFFIX is of the form "", "svn" or "Nsvn" (N being the minor patch level)
 SET (VERSION_MAJOR "1")
 SET (VERSION_MINOR "5")
 SET (VERSION_PATCH "0")
 SET (VERSION_SUFFIX "svn")
-SET (VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_SUFFIX})
+SET (VERSION ${VERSION_MAJOR})
+IF (VERSION_MINOR GREATER -1)
+  SET (VERSION ${VERSION}.${VERSION_MINOR})
+ENDIF (VERSION_MINOR GREATER -1)
+IF (VERSION_PATCH GREATER -1)
+  SET (VERSION ${VERSION}.${VERSION_PATCH})
+ENDIF (VERSION_PATCH GREATER -1)
+IF (VERSION_SUFFIX)
+  SET (VERSION ${VERSION}.${VERSION_SUFFIX})
+ENDIF (VERSION_SUFFIX)
 MESSAGE(STATUS "Scribus ${VERSION} will be built to install into ${CMAKE_INSTALL_PREFIX}")
 
 #Set the permissions to be used when installing plugins




More information about the scribus-commit mailing list