Commit 959155fa authored by Alberto Villa's avatar Alberto Villa Committed by Vincent PINON

Rename VERSION #define to KDENLIVE_VERSION

Conflicts:
	src/mainwindow.cpp

Conflicts:
	src/mainwindow.cpp
parent ad810d1d
......@@ -15,33 +15,31 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
option(RELEASE_BUILD "Remove Git revision from program version (use for stable releases)" OFF)
# Get current version.
set(VERSION "\"${KDENLIVE_VERSION}\"")
if(NOT RELEASE_BUILD)
if(EXISTS ${PROJECT_SOURCE_DIR}/.git)
# Probably a Git workspace: determine the revision.
find_package(Git)
if(GIT_FOUND)
set(KDENLIVE_VERSION_STRING "${KDENLIVE_VERSION}")
if(NOT RELEASE_BUILD AND EXISTS ${CMAKE_SOURCE_DIR}/.git)
# Probably a Git workspace; determine the revision.
find_package(Git QUIET)
if(GIT_FOUND)
exec_program(${GIT_EXECUTABLE}
${CMAKE_SOURCE_DIR}
ARGS "describe --tags"
OUTPUT_VARIABLE KDENLIVE_GIT_REVISION
RETURN_VALUE TAG_RESULT
)
# git describe --tags failed; maybe the repository was checked with depth=1.
if(NOT ${TAG_RESULT} EQUAL 0)
exec_program(${GIT_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}
ARGS "describe --tags"
${CMAKE_SOURCE_DIR}
ARGS "describe --always"
OUTPUT_VARIABLE KDENLIVE_GIT_REVISION
RETURN_VALUE TAG_RESULT
)
# git describe --tags failed, for example it fails if repo was checked with depth=1
if(NOT ${TAG_RESULT} EQUAL 0)
exec_program(${GIT_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}
ARGS "describe --always"
OUTPUT_VARIABLE KDENLIVE_GIT_REVISION
)
endif(NOT ${TAG_RESULT} EQUAL 0)
message("Current Kdenlive Git revision is ${KDENLIVE_GIT_REVISION}")
set(VERSION "\"${KDENLIVE_VERSION} (rev. ${KDENLIVE_GIT_REVISION})\"")
else(GIT_FOUND)
message("Could not determine the Git revision")
endif(GIT_FOUND)
endif(EXISTS ${PROJECT_SOURCE_DIR}/.git)
endif(NOT RELEASE_BUILD)
endif()
message(STATUS "Kdenlive Git revision: ${KDENLIVE_GIT_REVISION}")
set(KDENLIVE_VERSION_STRING "${KDENLIVE_VERSION} (rev. ${KDENLIVE_GIT_REVISION})")
else()
message(STATUS "Kdenlive Git revision could not be determined")
endif()
endif()
include(CheckIncludeFiles)
check_include_files(malloc.h HAVE_MALLOC_H)
......
#ifndef CONFIG_H
#define CONFIG_H
#cmakedefine VERSION @VERSION@
#define KDENLIVE_VERSION "@KDENLIVE_VERSION_STRING@"
#define MLT_PREFIX "@MLT_PREFIX@"
......
......@@ -687,7 +687,7 @@ QDomDocument KdenliveDoc::xmlSceneList(const QString &scene, const QStringList &
QDomElement markers = sceneList.createElement("markers");
addedXml.setAttribute("version", DOCUMENTVERSION);
addedXml.setAttribute("kdenliveversion", VERSION);
addedXml.setAttribute("kdenliveversion", KDENLIVE_VERSION);
addedXml.setAttribute("profile", profilePath());
addedXml.setAttribute("projectfolder", m_projectFolder.path());
......
......@@ -31,7 +31,7 @@
int main(int argc, char *argv[])
{
KAboutData aboutData(QByteArray("kdenlive"), QByteArray("kdenlive"),
ki18n("Kdenlive"), VERSION,
ki18n("Kdenlive"), KDENLIVE_VERSION,
ki18n("An open source video editor."),
KAboutData::License_GPL,
ki18n("Copyright © 2007–2014 Kdenlive authors"));
......
......@@ -118,14 +118,7 @@
#include <stdlib.h>
#include <locale.h>
// Uncomment for deeper debugging
//#define DEBUG_MAINW
#ifdef DEBUG_MAINW
#include <QDebug>
#endif
static const char version[] = VERSION;
static const char version[] = KDENLIVE_VERSION;
namespace Mlt
{
......
......@@ -51,7 +51,7 @@ const int mltVersionMajor = 0;
const int mltVersionMinor = 8;
const int mltVersionRevision = 8;
static const char kdenlive_version[] = VERSION;
static const char kdenlive_version[] = KDENLIVE_VERSION;
Wizard::Wizard(bool upgrade, QWidget *parent) :
QWizard(parent),
......
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