[Uml-devel] KDE/kdesdk/umbrello/umbrello
Andi Fischer
andi.fischer at hispeed.ch
Sun Jul 10 14:50:33 UTC 2011
SVN commit 1240830 by fischer:
SVN revision number added to version number - else path added to CMakeLists.txt.
M +19 -13 CMakeLists.txt
M +4 -8 version.h
--- trunk/KDE/kdesdk/umbrello/umbrello/CMakeLists.txt #1240829:1240830
@@ -3,20 +3,26 @@
add_definitions(-DQT3_SUPPORT_WARNINGS)
-# Get subversion revision number
-# find_package(Subversion)
-# if(Subversion_FOUND)
-# # extract working copy information for SOURCE_DIR into MY_XXX variables
-# Subversion_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} MY)
-# set(SUBVERSION_REVISION ${MY_WC_REVISION})
-# MESSAGE(STATUS "\n-- SVN Revision: ${MY_WC_REVISION}\n")
-# configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/revision.h.in ${CMAKE_CURRENT_BINARY_DIR}/revision.temp)
-# execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
-# ${CMAKE_CURRENT_BINARY_DIR}/revision.temp ${CMAKE_CURRENT_BINARY_DIR}/revision.h
-# COMMAND touch ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
-# file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/revision.temp)
-# endif(Subversion_FOUND)
+#### get subversion revision number ###
+find_package(Subversion)
+if(Subversion_FOUND)
+ # extract working copy information for SOURCE_DIR into MY_XXX variables
+ Subversion_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} MY)
+ set(SUBVERSION_REVISION ${MY_WC_REVISION})
+ MESSAGE(STATUS "\n-- SVN Revision: ${MY_WC_REVISION}\n")
+else(Subversion_FOUND)
+ set(SUBVERSION_REVISION 0)
+ MESSAGE(STATUS"\n-- SVN Revision: 0 - no package Subversion available!\n")
+endif(Subversion_FOUND)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/revision.h.in ${CMAKE_CURRENT_BINARY_DIR}/revision.temp)
+execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${CMAKE_CURRENT_BINARY_DIR}/revision.temp ${CMAKE_CURRENT_BINARY_DIR}/revision.h
+ COMMAND touch ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
+file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/revision.temp)
+
+########### set variables #############
+
# Some definitions for experimental code or debugging
#add_definitions(-DWANT_LVTOOLTIP) # umllistiew
#add_definitions(-DXMI_FLAT_PACKAGES) # umlobject
--- trunk/KDE/kdesdk/umbrello/umbrello/version.h #1240829:1240830
@@ -11,21 +11,17 @@
#ifndef UMBRELLO_VERSION_H
#define UMBRELLO_VERSION_H
-//#include "revision.h"
+#include "revision.h"
#include <kdeversion.h>
inline QByteArray umbrelloVersion()
{
-// return QString("%1.%2.%3-r%4")
-// .arg(KDE::versionMajor()-2)
-// .arg(KDE::versionMinor())
-// .arg(KDE::versionRelease())
-// .arg(REVISION).toLatin1();
- return QString("%1.%2.%3")
+ return QString("%1.%2.%3-r%4")
.arg(KDE::versionMajor()-2)
.arg(KDE::versionMinor())
- .arg(KDE::versionRelease()).toLatin1();
+ .arg(KDE::versionRelease())
+ .arg(REVISION).toLatin1();
}
#endif
More information about the umbrello-devel
mailing list