Use svnversion program rather than finding the svn package to get revision number
authorTim Goya <tuxdev103@gmail.com>
Sun, 2 Nov 2008 19:21:49 +0000 (19:21 +0000)
committerTim Goya <tuxdev103@gmail.com>
Sun, 2 Nov 2008 19:21:49 +0000 (19:21 +0000)
SVN-Revision: 5818

CMakeLists.txt

index fedd77a..0593305 100644 (file)
@@ -128,11 +128,13 @@ ENDIF(CURL_FOUND)
 #LINK_LIBRARIES(${ICONV_LIBRARY})
 
 ## Find revision of WC
-FIND_PACKAGE(Subversion)
-IF(Subversion_FOUND)
-  Subversion_WC_INFO(${SUPERTUX_SOURCE_DIR} SUPERTUX)
+MARK_AS_ADVANCED(SVNVERSION_EXECUTABLE)
+FIND_PROGRAM(SVNVERSION_EXECUTABLE svnversion)
+IF(SVNVERSION_EXECUTABLE)
+  EXECUTE_PROCESS(COMMAND svnversion -n ${SUPERTUX_SOURCE_DIR}
+                  OUTPUT_VARIABLE SUPERTUX_WC_REVISION)
   SET(REVISION " r${SUPERTUX_WC_REVISION}")
-ENDIF(Subversion_FOUND)
+ENDIF(SVNVERSION_EXECUTABLE)
 
 ## Check platform-dependent build options