Add svn revision to Kdenlive version at build time

svn path=/trunk/kdenlive/; revision=3148
parent 26cf46e4
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(MSGFMT_EXECUTABLE msgfmt)
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(lumas)
add_subdirectory(po)
add_subdirectory(man)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/kdenlive-config.h.cmake kdenlive-config.h @ONLY)
#ifndef CONFIG_H
#define CONFIG_H
#cmakedefine VERSION @VERSION@
#endif
......@@ -18,21 +18,25 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
#include "kdenlive-config.h"
#include "mainwindow.h"
#include <KApplication>
#include <KAboutData>
#include <KDebug>
#include <KCmdLineArgs>
#include <KUrl> //new
#include "mainwindow.h"
#if defined(__APPLE_KDE__) || defined(__DARWIN__)
#include <SDL/SDL.h>
#endif
static const char version[] = VERSION;
int main(int argc, char *argv[]) {
KAboutData aboutData(QByteArray("kdenlive"), QByteArray("kdenlive"),
ki18n("Kdenlive"), QByteArray("0.7.2"),
ki18n("Kdenlive"), QByteArray(version),
ki18n("An open source video editor."),
KAboutData::License_GPL,
ki18n("Copyright (c) 2008 Development team"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment