Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /CMakeLists.txt [712b09] .. [bb11a3] Maximize Restore

  Switch to side-by-side view

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,8 @@
 project(kdenlive)
 
+SET(BASE_VERSION 0.7.2)
 
+OPTION(RELEASE_BUILD "Remove compilation date to version, use for stable releases (default off)" OFF)
 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
 
 # search packages used by KDE
@@ -22,7 +24,25 @@
 find_program(MSGMERGE_EXECUTABLE msgmerge)
 find_program(XGETTEXT_EXECUTABLE xgettext)
 
-
+# current version
+IF (RELEASE_BUILD)
+    SET(VERSION "\"${BASE_VERSION}\"")
+ELSE(RELEASE_BUILD)
+   IF (EXISTS ${PROJECT_SOURCE_DIR}/.svn) 
+      # Probably a SVN workspace, determine revision level 
+      FIND_PACKAGE(Subversion) 
+      IF(Subversion_FOUND) 
+        Subversion_WC_INFO(${PROJECT_SOURCE_DIR} KDENLIVE) 
+        MESSAGE("Current revision is ${KDENLIVE_WC_REVISION}") 
+	SET(VERSION "\"${BASE_VERSION} (rev. ${KDENLIVE_WC_REVISION})\"")
+      ELSE(Subversion_FOUND)
+	MESSAGE("Could not determine SVN revision")
+	SET(VERSION "\"${BASE_VERSION}\"")
+      ENDIF(Subversion_FOUND) 
+    ELSE(EXISTS ${PROJECT_SOURCE_DIR}/.svn)
+    SET(VERSION "\"${BASE_VERSION}\"")
+    ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/.svn)
+ENDIF(RELEASE_BUILD)
 
 add_subdirectory(src src/cmake_bindir)
 add_subdirectory(renderer renderer/cmake_bindir)
@@ -36,4 +56,5 @@
 add_subdirectory(po)
 add_subdirectory(man)
 
+CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/kdenlive-config.h.cmake kdenlive-config.h @ONLY)