[cmake]: add git and svn version script

Change-Id: Ia1f908986f503191c3e5a6bbe9dc5daa55648b40
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
Herman Chen
2016-08-20 18:44:34 +08:00
parent 9da1bfaa04
commit 72a6e3b06a
3 changed files with 79 additions and 15 deletions

View File

@@ -23,16 +23,17 @@
#include "mpp_env.h"
#include "mpp_info.h"
#include "svn_info.h"
#include "version.h"
/*
* To avoid string | grep author getting multiple results
* use commit to replace author
*/
static char mpp_version_revision[] = SVN_VERSION;
static char mpp_version_commit[] = SVN_AUTHOR;
static char mpp_version_date[] = SVN_DATE;
static char mpp_version_one_line[] = SVN_ONE_LINE;
static char mpp_version_revision[] = MPP_VERSION;
static char mpp_version_commit[] = MPP_AUTHOR;
static char mpp_version_date[] = MPP_DATE;
static char mpp_version_one_line[] = MPP_ONE_LINE;
static char mpp_version_number[] = MPP_VER_NUM;
static RK_CHIP_TYPE chip_version(void)
{
@@ -97,6 +98,6 @@ RK_CHIP_TYPE get_chip_type()
int mpp_info_get_revision()
{
return atoi(SVN_VERSION);
return atoi(mpp_version_number);
}