r14910 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:19 CET 2010


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

Changeset: 
M  /branches/Version135/Scribus/CMakeLists.txt

Diffs:
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 14909)
+++ CMakeLists.txt	(revision 14910)
@@ -7,11 +7,11 @@
 #its not likely 2.4.x will work any more
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
 
-IF(WIN32)
-  IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.6)
-    MESSAGE(FATAL_ERROR "Windows builds require CMake 2.6")
-  ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.6)
-ENDIF(WIN32)
+#IF(WIN32)
+#  IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.6)
+#    MESSAGE(FATAL_ERROR "Windows builds require CMake 2.6")
+#  ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.6)
+#ENDIF(WIN32)
 
 #Pretty colors
 SET(CMAKE_COLOR_MAKEFILE ON)
@@ -73,13 +73,22 @@
 #Project Setup
 PROJECT(scribus)
 #Set our version values
-#Final version is ${VERSION} = ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SUFFIX}
-#where VERSION_SUFFIX is of the form "", "cvs" or "Ncvs" (N being the minor patch level)
+#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 "3")
 SET (VERSION_PATCH "7")
 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